error-handling

Implements robust error-handling strategies including retry and circuit-breaker patterns for APIs and services.

Updated Jan 20, 2026
One-click install
npx skills add https://github.com/TheeCoderAhmed/Skills-Master --skill error-handling-theecoderahmed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/TheeCoderAhmed/Skills-Master/tree/main/.agent/skills/error-handling
Command: npx skills add https://github.com/TheeCoderAhmed/Skills-Master --skill error-handling-theecoderahmed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Error handling is often overlooked and brittle; this skill guides you to design and implement robust strategies to detect, classify, and gracefully recover from failures across services and components.

Core Features & Use Cases

  • Structured error classifications: recoverable vs unrecoverable errors with clear error types.
  • Resilience patterns: retry, circuit breaker, and error aggregation to prevent cascading failures.
  • Observability & cleanup: log context-rich errors and ensure resources are released.

Quick Start

Implement a retry with exponential backoff and a circuit breaker for a failing external API call.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I implement a circuit breaker for a failing external API call?

To implement a circuit breaker for external API calls, structure your error handling to classify recoverable failures and halt requests when thresholds are met. This prevents cascading failures across distributed services by tripping the breaker during sustained outages.

What's the best way to add retry with exponential backoff to an API integration?

The best way to add retry with exponential backoff is to classify API errors as recoverable or unrecoverable first. Apply retry logic only to recoverable failures, ensuring transient errors are resolved without overwhelming the external service with immediate repeated requests.

How does structured error classification improve application resilience?

Structured error classification improves application resilience by explicitly defining recoverable versus unrecoverable error types. This distinction allows your application to automatically retry safe failures while immediately escalating permanent issues, preventing brittle crashes and cascading system failures.

Why do my cascading service failures happen even with standard error logging?

Cascading service failures happen because standard error logging lacks active resilience patterns. Without a circuit breaker to stop requests to failing dependencies or proper error aggregation, initial errors propagate downstream and cause widespread system instability.

Can I use this error-handling approach for both synchronous and asynchronous contexts?

Yes, you can apply this error-handling approach to both synchronous and asynchronous contexts. The strategies support proper resource cleanup, context-rich logging, and resilience patterns like circuit breakers across all execution models for comprehensive reliability.

When should I not use a retry pattern for error handling?

You should not use a retry pattern for unrecoverable errors or non-transient failures. If an error is classified as permanent, retrying the operation wastes resources and delays necessary fallback procedures or alerting without resolving the underlying issue.