error-handling-expert
Installation
SKILL.md
Error Handling Expert
Build resilient applications with robust error handling strategies that gracefully handle failures and provide excellent debugging experiences. This skill consolidates best practices for designing error architectures.
When to Use This Skill
- Designing error handling for new features or APIs
- Deciding between Exceptions vs Result types
- Implementing retry/circuit breaker patterns
- Improving error messages and debugging context
- Handling async/concurrent errors in distributed systems
Core Concepts
1. Error Handling Philosophies
Exceptions vs Result Types:
- Exceptions: Traditional try-catch, disrupts control flow. Use for unexpected errors, exceptional conditions (e.g., Network Down, Disk Full).
- Result Types: Explicit success/failure, functional approach. Use for expected errors, validation failures (e.g., User Not Found, Invalid Email).
- Panic/Crash: Unrecoverable errors, programming bugs (e.g., Index Out of Bounds).