CtrlK
BlogDocsLog inGet started
Tessl Logo

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.

75

1.29x
Quality

54%

Does it follow best practices?

Impact

88%

1.29x

Average score across 6 eval scenarios

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./plugins/developer-essentials/skills/error-handling-patterns/SKILL.md
SKILL.md
Quality
Evals
Security

Evaluation results

98%

32%

Order Data Service — TypeScript Implementation

TypeScript error classes and Result types

Criteria
Without context
With context

captureStackTrace

0%

100%

Error name set

100%

100%

Typed error fields

0%

100%

Result type shape

100%

100%

Ok helper

0%

100%

Err helper

0%

100%

instanceof discrimination

100%

100%

Default for known errors

100%

100%

Re-throw unexpected

100%

75%

No error code returns

100%

100%

No empty catch blocks

100%

100%

Promise rejections handled

100%

100%

92%

22%

Weather Data Pipeline — Resilient Python Implementation

Python exception hierarchy and resilience patterns

Criteria
Without context
With context

ApplicationError timestamp

0%

100%

ApplicationError code and details

0%

100%

ExternalServiceError service field

25%

100%

Exception hierarchy

100%

100%

Exponential backoff formula

100%

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

100%

100%

91%

22%

User Registration Service — Validation and Profile Fetching

Error aggregation and graceful degradation

Criteria
Without context
With context

Error collector class

40%

50%

Collects all errors

100%

100%

AggregateError for multiple

0%

80%

with_fallback function

0%

100%

Fallback invoked on failure

100%

100%

Fallback error logged

75%

100%

Meaningful error messages

100%

100%

No validation error spam

100%

100%

No swallowed errors

100%

100%

Resource cleanup

100%

75%

No error code returns

62%

100%

67%

36%

Inventory Management CLI Tool

Go error handling and wrapping

Criteria
Without context
With context

Explicit error returns

37%

75%

Custom error struct

0%

100%

Error() method format

0%

100%

Sentinel errors

0%

0%

fmt.Errorf %w wrapping

0%

100%

errors.Is usage

0%

0%

errors.As usage

0%

0%

Meaningful error messages

87%

100%

No error code returns

100%

100%

No ignored errors

75%

87%

Fail fast validation

87%

100%

92%

Server Configuration Validator

Rust Result/Option types and error conversion

Criteria
Without context
With context

Custom error enum

100%

100%

Debug derive

100%

100%

From trait impl

100%

100%

? operator usage

100%

100%

No unwrap in production paths

100%

100%

Option returned for nullable

0%

0%

ok_or_else conversion

100%

100%

Contextual error variants

100%

100%

Meaningful error messages

100%

100%

No swallowed errors

100%

100%

Functions return Result

100%

100%

91%

7%

Document Processing Pipeline

Error type selection and handling at the right level

Criteria
Without context
With context

Result type for validation

20%

30%

Exceptions for unexpected

100%

100%

Panic/assert only for bugs

100%

100%

No broad catch-all

100%

90%

Handle at right level

100%

100%

No log-and-rethrow

100%

100%

No empty catch blocks

100%

100%

Type-safe errors

100%

100%

Contextual error metadata

37%

100%

No error code returns

100%

100%

Fail fast on bad input

50%

83%

Resource cleanup on error

100%

100%

Repository
wshobson/agents
Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents

Is this your skill?

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.