error-handling-patternslisted
Install: claude install-skill JayRHa/AgentSkills
# Error Handling Patterns
## Overview
Robust error handling is about making explicit, deliberate decisions for every failure mode instead of letting failures propagate as unhandled crashes, silent data corruption, or hung requests. This skill provides a decision framework and concrete patterns for: distinguishing recoverable from unrecoverable errors, choosing between result types and exceptions, retrying transient failures safely, bounding latency with timeouts and deadlines, protecting failing dependencies with circuit breakers, and degrading gracefully when a dependency is down.
Keywords: error handling, exceptions, result type, Either, retry, exponential backoff, jitter, timeout, deadline, circuit breaker, bulkhead, idempotency, graceful degradation, fallback, fail fast, fault tolerance, resilience, transient errors, dead letter queue.
Apply this skill whenever code crosses a trust or failure boundary: network calls, database queries, file I/O, external APIs, message queues, subprocess execution, or any operation that can fail in ways the caller must handle.
## Core Principles
1. **Every error has exactly one owner.** At each layer, decide: handle it here, transform and rethrow, or let it propagate. Never silently swallow.
2. **Classify before you react.** A failure is either *transient* (retry may succeed) or *permanent* (retry is futile). The classification drives every other decision. See `references/error-taxonomy.md`.
3. **Fail fast on programmer errors, recove