principle-error-handling
CommunityTurn failures into reliable, diagnosable behavior.
Software Engineering#error handling#reliability#circuit breaker#error wrapping#retry with backoff#timeouts deadlines#logging discipline
Authorlugassawan
Version1.0.0
Installs0
System Documentation
What problem does it solve?
It prevents silent failures and confusing bugs by enforcing consistent error modeling, classification, wrapping, retry logic, timeouts, and boundary logging.
Core Features & Use Cases
- Error contracts that callers can reason about: use value-based errors (e.g., Go error, Rust Result, TypeScript typed errors) and reserve exceptions/panics for programmer errors.
- Correct handling strategies via classification: distinguish transient, permanent, and programmer errors to decide whether to retry, fail fast, or crash.
- Context-preserving error chains: wrap and propagate original causes so downstream diagnostics remain accurate.
- Retry/backoff with safety rails: apply exponential backoff with jitter, enforce retry budgets, and ensure idempotency before retrying.
- Deadline-aware reliability: propagate timeouts/deadlines correctly and return distinct timeout/deadline exceeded failures.
- Boundary logging discipline: log once at the layer that handles the error, and never log from libraries.
- Resilience patterns where needed: use circuit breakers and bulkheads to prevent cascading failures instead of over-retrying.
Quick Start
Ask an AI to review your function or API design for error classification, context-wrapping, retry/idempotency safety, timeout/deadline propagation, and log-once boundary placement for your target language.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: principle-error-handling Download link: https://github.com/lugassawan/swe-workbench/archive/main.zip#principle-error-handling Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.