error-handling-resilience

Implements error classification, retry backoff, circuit breakers, and graceful degradation patterns in TypeScript.

1|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/dominionism/Noesis --skill error-handling-resilience-dominionism
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: error-handling-resilience
Source: https://github.com/dominionism/Noesis/tree/main/assets/skills/error-handling-resilience
Command: npx skills add https://github.com/dominionism/Noesis --skill error-handling-resilience-dominionism

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Codebases often contain empty catch blocks, catch-all retries, and swallowed error context that cause silent failures, duplicate operations, and cascading outages. This Skill provides concrete patterns for classifying errors and choosing the correct recovery strategy so systems degrade gracefully instead of failing unpredictably. ## Core Features & Use Cases - Error Classification: A decision table that maps error classes (transient, rate-limited, client, server, resource exhaustion, data integrity, configuration) to the correct response, including whether each is retryable. - Typed Error Hierarchy: TypeScript AppError base class with ValidationError, NotFoundError, ExternalServiceError, and RateLimitError subclasses carrying status codes and retryability flags. - Resilience Patterns: Ready-to-use implementations of exponential backoff with jitter, a circuit breaker with closed/open/half-open states, and a multi-level graceful degradation fallback chain. - Anti-pattern Detection: Concrete examples of empty catch blocks, overly broad catches, swallowed error context, and non-idempotent retries, plus an 8-point verification checklist. - Use Case: When reviewing a service that calls the Stripe API, apply the circuit breaker pattern with a fallback response and an idempotency key on retried POST requests to prevent duplicate charges during outages. ## Quick Start Ask the AI to review your external API call code and apply the error classification table, retry with backoff, and circuit breaker patterns from this Skill.

Frequently Asked Questions about error-handling-resilience

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement retry with exponential backoff in TypeScript?▼

Wrap the operation in a withRetry helper that doubles the delay each attempt, caps it at a maximum, and adds random jitter. Only retry errors flagged as retryable, such as ExternalServiceError, and stop after the configured maxRetries.

How does a circuit breaker pattern work for external API calls?▼

A circuit breaker tracks consecutive failures and opens after a threshold, rejecting calls or returning a fallback until a reset timeout passes. It then enters half-open state to test recovery before fully closing again.

Which errors should be retried and which should not?▼

Retry transient errors like network timeouts and HTTP 503, and rate-limit errors after the Retry-After delay. Never retry client errors, configuration errors, data integrity violations, or resource exhaustion; those should propagate or alert.

Why is retrying a POST request dangerous without idempotency?▼

If the first request succeeded but the response was lost, retrying creates a duplicate operation such as a double order or charge. Attach a unique Idempotency-Key header so the server can detect and reject duplicates.

What is graceful degradation and when should I use it?▼

Graceful degradation is a fallback hierarchy: try the primary source, then cached data, then a static default, logging at each level. Use it for non-critical dependencies like recommendation services so users get useful output instead of errors.