Agent skill · writing content · aiskillstore
error-handling-patterns
Master error handling patterns across languages including exceptions, Result types, error propagation, and graceful degradation to build resilient applications. Use when implementing error handling, designing APIs, or improving application reliability.
Why this skill is useful
Provides domain-specific knowledge on error handling patterns and implementations across multiple programming languages that the AI wouldn't reliably generate on its own.
What it needs
About 7k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Error Handling Patterns Build resilient applications with robust error handling strategies that gracefully handle failures and provide excellent debugging experiences. When to Use This Skill Implementing error handling in new features Designing error-resilient APIs Debugging production issues Improving application reliability Creating better error messages for users and developers Implementing retry and circuit breaker patterns Handling async/concurrent errors Building fault-tolerant distributed systems Core Concepts 1. Error Handling Philosophies Exceptions vs Result Types: Exceptions: Traditional try-catch, disrupts control flow Result Types: Explicit success/failure, functional approach Error Codes: C-style, requires discipline Option/Maybe Types: For nullable values When to Use Each: Exceptions: Unexpected errors, exceptional conditions Result Types: Expected errors, validation failures Panics/Crashes: Unrecoverable errors, programming bugs 2. Error Categories Recoverable Errors: Network timeouts Missing files Invalid user input API rate limits Unrecoverable Errors: Out of memory Stack overflow Programming bugs (null pointer, etc.) Language-Specific Patterns Python Error Handling Custom Exception Hierarchy: Context Managers for Cleanup: Retry with Exponential Backoff: TypeScript/JavaScript Error Handling Custom Error Classes: Result Type Pattern: Async Error Handling: Rust Error Handling Result and Option Types: Go Error Handling Explicit Error Returns: Universal Patterns Pattern 1: Circuit Breaker Prevent cascading failures in distributed systems. Pattern 2: Error Aggregation Collect multiple errors instead of failing on first error. Pattern 3: Graceful Degradation Provide fallback functionality when errors occur. Best Practices 1. Fail Fast: Validate input early, fail quickly 2. Preserve Context: Include stack traces, metadata, timestamps 3. Meaningful Messages: Explain what happened and how to fix it 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/error-handling-patterns--5d1829