sfermanelli-error-handling

Designs layered error models with retry, logging, and failover strategies.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Design error handling that makes failures visible, recoverable, and debuggable. Errors are not exceptional — they are expected. A system that handles errors well is more valuable than one that never errors in testing.

Core Features & Use Cases

  • Error hierarchies separate domain, application, and infrastructure errors to clarify responsibility and enable targeted handling.
  • Error boundaries, retries, and graceful degradation to isolate failures, recover from transient issues, and preserve service availability.
  • Logging and HTTP error handling to present actionable, safe error responses while supporting observability across services.
  • Use Case: when a downstream service fails transiently, apply retry, circuit breaker, and structured error signaling to minimize user impact.

Quick Start

Start by defining a layered error hierarchy (DomainError, ValidationError, InfrastructureError) and wire a centralized error handler that logs, formats responses, and gracefully degrades when external services fail.

Frequently Asked Questions about sfermanelli-error-handling

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

FAQPage Schema
How do I design an error hierarchy for domain, application, and infrastructure layers?

Designing an error hierarchy separates domain, application, and infrastructure errors to clarify responsibility and enable targeted handling across software service workflows. This layered model ensures failures are visible, recoverable, and debuggable.

What is the best way to handle transient downstream service failures?

Handling transient downstream service failures requires applying retry strategies, circuit breaker patterns, and structured error signaling to minimize user impact. Safe fallbacks and graceful degradation preserve service availability during recovery.

How do I implement centralized HTTP error handling with structured logging?

Implementing centralized HTTP error handling involves wiring a handler that logs errors and formats safe responses across services. Structured logging supports observability while presenting actionable HTTP error responses to users.

When should I use a circuit breaker pattern for error handling?

Use a circuit breaker pattern for error handling when a downstream service fails transiently, preventing cascading failures and allowing recovery. It isolates failures and supports graceful degradation to maintain availability.

Does error handling with retry and backoff require specific dependencies?

Error handling with retry, backoff, and circuit-breaking patterns does not require external dependencies, as it uses standalone design patterns. Define layered error hierarchies and wire handlers to manage failures across infrastructure layers.

Why does my application need graceful degradation and error boundaries?

Applications need graceful degradation and error boundaries to isolate failures and preserve service availability when external services fail. They make errors recoverable by applying safe fallbacks during unexpected infrastructure issues.