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.
Install with Tessl CLI
npx tessl i github:wshobson/agents --skill error-handling-patterns72
Does it follow best practices?
If you maintain this skill, you can automatically optimize it using the tessl CLI to improve its score:
npx tessl skill review --optimize ./path/to/skillAgent success when using this skill
Validation for skill structure
TypeScript error classes and Result types
captureStackTrace
0%
100%
Error name set
100%
100%
Typed error fields
0%
100%
Result type shape
50%
100%
Ok helper
0%
100%
Err helper
0%
100%
instanceof discrimination
100%
100%
Default for known errors
100%
100%
Re-throw unexpected
100%
100%
No error code returns
100%
100%
No empty catch blocks
100%
100%
Promise rejections handled
100%
100%
Without context: $0.3668 · 2m 15s · 14 turns · 15 in / 5,282 out tokens
With context: $1.1800 · 4m 8s · 43 turns · 43 in / 10,692 out tokens
Python exception hierarchy and resilience patterns
ApplicationError timestamp
0%
100%
ApplicationError code and details
0%
100%
ExternalServiceError service field
0%
100%
Exception hierarchy
100%
100%
Exponential backoff formula
83%
100%
Retry catches specific exceptions
100%
100%
Circuit breaker three states
100%
100%
OPEN state rejects immediately
100%
100%
HALF_OPEN transition
100%
100%
Context manager cleanup
0%
0%
Fail fast validation
100%
100%
No log-and-rethrow
87%
100%
Without context: $0.5730 · 2m 35s · 23 turns · 23 in / 7,856 out tokens
With context: $1.3878 · 11m 33s · 41 turns · 36 in / 18,493 out tokens
Error aggregation and graceful degradation
Error collector class
50%
100%
Collects all errors
100%
100%
AggregateError for multiple
20%
80%
with_fallback function
30%
100%
Fallback invoked on failure
100%
100%
Fallback error logged
62%
62%
Meaningful error messages
100%
100%
No validation error spam
100%
100%
No swallowed errors
100%
100%
Resource cleanup
75%
100%
No error code returns
100%
100%
Without context: $0.3006 · 1m 47s · 13 turns · 13 in / 4,349 out tokens
With context: $0.4186 · 1m 44s · 15 turns · 16 in / 4,619 out tokens
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.