error-handling
Installation
SKILL.md
Error Handling with wellcrafted trySync and tryAsync
When to Apply This Skill
Use this pattern when you need to:
- Replace recoverable
try-catchblocks withtrySyncortryAsync. - Handle fallback success paths via
Ok(...)and propagate failures withErr(...). - Wrap caught exceptions as
causefor typed domain error constructors. - Refactor nested error branches into immediate-return linear control flow.
- Convert handler failures into HTTP status responses with explicit guards.
References
Load these on demand based on what you're working on: