handling-errors
SKILL.md
Handling Errors
When to use this skill
- Implementing error handling in new features.
- Designing error-resilient APIs and distributed systems.
- Improving application reliability through Circuit Breakers or Graceful Degradation.
- Standardizing error messages and custom exception hierarchies.
Workflow
- Categorization
- Determine if the error is Recoverable (e.g., Network Timeout) or Unrecoverable (e.g., OOM).
- Strategy Selection
- Choose a pattern: Fail Fast, Retry, Circuit Breaker, or Graceful Degradation.
- Implementation
- Use language-specific best practices (Custom Exceptions, Result Types, or Explicit Returns).
- Verification
- Validate that errors are logged with context and resources are cleaned up.