convention-error-handling

Define exception hierarchies, retry strategies, and circuit breaker patterns for error handling.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/sunLeee/optimization --skill convention-error-handling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: convention-error-handling
Source: https://github.com/sunLeee/optimization/tree/main/.claude/skills/reference/convention/convention-error-handling
Command: npx skills add https://github.com/sunLeee/optimization --skill convention-error-handling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Convention-driven error handling provides a scalable, standardized approach to manage exceptions, retries, and resilience across software systems.

Core Features & Use Cases

  • Formal exception hierarchy with a root ApplicationError and specialized errors (ValidationError, DatabaseError, NetworkError, ConfigurationError, TimeoutError, FatalError)
  • Retry strategies with exponential backoff to avoid cascading failures
  • Circuit breaker pattern to fail-fast on repeated external service failures
  • Structured logging and observability guidelines for traceability
  • Guidance for graceful degradation and consistent recovery across APIs, services, and background tasks
  • Governance and testing practices to ensure uniform error handling across teams

Quick Start

Integrate the predefined exception hierarchy, retry policies, and circuit-breaker patterns into your codebase to begin applying standardized error handling.

Frequently Asked Questions about convention-error-handling

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

FAQPage Schema
How do I standardize error handling across APIs and background tasks?

To standardize error handling across APIs and background tasks, establish a formal exception hierarchy with a root ApplicationError and specialized errors like ValidationError or NetworkError. This approach ensures consistent recovery, structured logging, and traceability across diverse architectures.

What is the best way to implement retry logic with exponential backoff?

The best way to implement retry logic with exponential backoff is to apply standardized retry strategies that progressively increase wait times between requests. This avoids cascading failures during temporary service disruptions and enforces consistent recovery for network operations.

How does a circuit breaker pattern prevent cascading failures in service integrations?

A circuit breaker pattern prevents cascading failures by failing fast when repeated external service failures occur. It monitors service integration health and stops sending requests when a failure threshold is met, enabling graceful degradation instead of overwhelming the system.

When do I need a formal exception hierarchy for application errors?

You need a formal exception hierarchy for application errors when managing complex software systems that require scalable resilience. Establishing a structured hierarchy with specialized errors like DatabaseError and TimeoutError enables consistent exception management, targeted recovery, and improved observability.

Can I use graceful degradation with structured logging for consistent recovery?

Yes, you can use graceful degradation alongside structured logging to ensure consistent recovery. This combination provides traceability during service disruptions and enforces governance practices, allowing your application to maintain partial functionality while capturing detailed error context.

Does convention-driven error handling work for diverse software architectures?

Convention-driven error handling works for diverse software architectures by applying standardized patterns like exception hierarchies, circuit breakers, and structured logging. This enforces consistent error management and observability guidelines across varying service integrations and background tasks.