error-handling-patterns
This skill covers error handling strategies for building resilient applications across multiple languages. Learn when to use exceptions versus Result types, how to categorize recoverable and unrecoverable errors, and implement patterns like retry with exponential backoff and async error handling. Includes language-specific examples for Python, TypeScript, and Rust.
Error Handling Patterns teaches resilient error management across Python, TypeScript, and Rust using exceptions, Result types, and recovery strategies.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-05-27
Error Handling Patterns teaches resilient error management across Python, TypeScript, and Rust using exceptions, Result types, and recovery strategies. This skill covers error handling strategies for building resilient applications across multiple languages. Learn when to use exceptions versus Result types, how to categorize recoverable and unrecoverable errors, and implement patterns like retry with exponential backoff and async error handling. Includes language-specific examples for Python, TypeScript, and Rust.
Use it when
- error-handling-patterns explains the circuit breaker pattern as a resilience mechanism that prevents cascading failures by stopping.
- error-handling-patterns contrasts Result types (used in Rust and TypeScript) with traditional exceptions.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
HermeticOrmus/LibreUIUX-Claude-Code/error-handling-patterns · repository language: Shell
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How to handle errors in Python effectively?
error-handling-patterns teaches Python error handling through try-except blocks, custom exception hierarchies, and context managers for cleanup. The skill covers distinguishing between recoverable errors (retry candidates) and unrecoverable ones, using specific exception types rather than bare except clauses, and implementing graceful degradation when errors occur. Python examples show proper exception chaining and resource management patterns.
What is the circuit breaker pattern and when should I use it?
error-handling-patterns explains the circuit breaker pattern as a resilience mechanism that prevents cascading failures by stopping requests to failing services. The pattern has three states: closed (normal operation), open (failing, reject requests), and half-open (testing recovery). This skill teaches implementation strategies for detecting failure thresholds, managing state transitions, and integrating circuit breakers into retry logic for fault-tolerant systems.
How do Result types compare to exceptions for error handling?
error-handling-patterns contrasts Result types (used in Rust and TypeScript) with traditional exceptions. Result types make errors explicit in function signatures and force callers to handle them, while exceptions can be silently propagated. The skill covers when each approach excels: Results for predictable, recoverable errors; exceptions for unexpected failures. Examples show how languages like Rust use Result<T, E> for type-safe error handling.
How do I implement retry logic with exponential backoff?
error-handling-patterns demonstrates retry logic patterns that attempt failed operations multiple times with increasing delays between attempts. Exponential backoff multiplies the delay after each failure (e.g., 1s, 2s, 4s, 8s) to avoid overwhelming recovering services. The skill covers jitter addition to prevent thundering herd problems, maximum retry limits, and integration with circuit breakers for comprehensive resilience in distributed systems.
What are best practices for handling async and concurrent errors?
error-handling-patterns addresses async error handling across Promise-based systems (TypeScript/JavaScript) and concurrent patterns. Key practices include proper Promise rejection handling, avoiding unhandled rejections, using async/await with try-catch for readability, and managing errors in parallel operations. The skill teaches error aggregation when multiple async tasks fail, timeout handling for hanging operations, and context propagation in distributed tracing.
How should I design a custom exception hierarchy?
error-handling-patterns guides designing exception hierarchies that reflect your application's error domain. Start with a base custom exception, then create specific subclasses for different error categories (validation, network, database, authorization). The skill emphasizes including context (error codes, messages, original cause) and avoiding overly deep hierarchies. Examples show language-specific implementations in Python and TypeScript for maintainable, debuggable error handling.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
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
(truncated - see the full file via the links below)
File tree — 1 file
plugins/developer-essentials/skills/error-handling-patterns/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Learn error handling patterns across multiple programming languages”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Master architectural patterns for building distributed systems through service decomposition, inter-service communication strategies, and fault tolerance techniques. Covers synchronous and asynchronous messaging, database ownership models, and resilience patterns like circuit breakers and bulkheads.
Learn to architect microservices by decomposing monoliths into independent services, managing inter-service communication through synchronous and asynchronous patterns, and implementing resilience strategies like circuit breakers and sagas. This skill covers service decomposition strategies, data management across distributed systems, and practical patterns for building fault-tolerant distributed architectures.
Architecture guides you through designing complete system architectures—from monolithic and microservices to event-driven and serverless approaches. It covers design patterns, quality attributes like performance and security, technology selection, and provides frameworks for documenting architectural decisions. Use it to evaluate trade-offs, plan scalability, and ensure your systems are maintainable and resilient.
Master the core patterns for building distributed architectures, from decomposing monoliths to implementing resilient inter-service communication. Covers service boundaries organized by business capability, synchronous and asynchronous messaging, and failure-handling techniques like circuit breakers and bulkheads.
Learn to structure Python tests using pytest, fixtures, parameterization, and mocking techniques. This skill covers unit and integration testing, test isolation, the AAA pattern, and debugging strategies to establish reliable test infrastructure.
This skill provides structured project templates for FastAPI applications, covering directory organization, configuration management, and async database integration. It includes patterns for dependency injection, CRUD repositories, and service layers to establish a scalable foundation for backend API development.
More skills Microservices Patterns (unlicensed) · microservices-patterns (MIT)