← Back to list

error-handling
by TheeCoderAhmed
⭐ 0🍴 0📅 Jan 20, 2026
SKILL.md
name: error-handling description: Guide for building resilient applications with robust error handling strategies. Use when designing APIs, debugging issues, or implementing resilience patterns like retries and circuit breakers.
Error Handling Patterns
When to use this skill
- Implementing error handling in new features
- Designing error-resilient APIs
- Debugging production issues or improving application reliability
- Creating better error messages
- Implementing resilience patterns (retry, circuit breaker)
- Handling async/concurrent errors
Workflow
- Analyze Context: Determine the type of error (Recoverable vs Unrecoverable) and the appropriate handling philosophy (Exceptions vs Result Types).
- Select Pattern: Choose the right pattern (e.g., Retry, Circuit Breaker, Error Aggregation) based on the requirement.
- Implement: Apply the pattern using language-specific best practices.
- Verify: Ensure errors are caught, logged, and handled gracefully without crashing the application.
Instructions
1. Philosophies & Categories
- Recoverable: Network issues, input validation. Handle with Result types or specific exceptions.
- Unrecoverable: OOM, bugs. Let it crash or catch at the top level.
- Exceptions: Use for unexpected/exceptional conditions.
- Result Types: Use for expected errors (validation, business logic).
2. Implementation by Language
- Python: Use custom exception hierarchies (
ApplicationError), context managers for cleanup, and decorators for retries. - TS/JS: Use custom
Errorclasses,Resulttype pattern for explicit handling, and properasync/awaittry-catch blocks. - Rust: Use
ResultandOptiontypes. - Go: Use explicit error returns and sentinel errors.
3. Universal Resilience Patterns
- Circuit Breaker: For distributed systems to prevent cascading failures.
- Error Aggregation: Collect multiple errors (e.g., validation) before failing.
- Graceful Degradation: Fallback to cache or default values when primary fails.
4. Best Practices
- Fail Fast: Validate early.
- Context: Include metadata in errors.
- Log properly: Don't spam logs for expected failures.
- Clean up: Always release resources (finally, defer).
Resources
Score
Total Score
40/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon