error-handling

Implement retries, circuit breakers, and structured JSON error logs.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Elric412/Leica-cam --skill error-handling-elric412
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/Elric412/Leica-cam/tree/main/.agents/skills/error-handling
Command: npx skills add https://github.com/Elric412/Leica-cam --skill error-handling-elric412

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a consistent, production-ready approach to capturing, classifying, and responding to runtime errors so systems remain observable, debuggable, and resilient under failure.

Core Features & Use Cases

  • Error Taxonomy & Mapping: Define error categories, severity levels, and mapping from internal errors to user-facing messages.
  • Structured Logging & Correlation: JSON-formatted logs with correlation IDs and redaction guidelines for safe aggregation and debugging.
  • Resilience Patterns: Retry strategies with exponential backoff and jitter, circuit breaker implementation, and graceful degradation/fallbacks.
  • Observability Integration: Hooks for error tracking services (Sentry), contextual tagging, and alerts for operational visibility.
  • Use Case: Harden an API client that intermittently fails by adding retries for transient errors, a circuit breaker to avoid overload, structured logs for incident triage, and user-friendly error responses.

Quick Start

Use the error-handling skill to design and implement structured logging, retries with exponential backoff, and a circuit breaker for an unreliable external API.

Frequently Asked Questions about error-handling

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

FAQPage Schema
What is structured error handling and why do I need it for my backend services?

Structured error handling captures, classifies, and responds to runtime errors so systems remain observable, debuggable, and resilient. You need it to maintain operational visibility and graceful degradation under failure.

How do I implement retry with exponential backoff and jitter for an unreliable API client?

Implement retries with exponential backoff and jitter to handle intermittent API failures by progressively increasing wait times between requests, preventing overload while allowing transient errors to recover gracefully.

Does this approach support generating structured JSON logs with correlation IDs for incident triage?

Yes, this approach supports generating JSON-formatted structured logs with correlation IDs, enabling safe aggregation and efficient debugging during incident triage across backend services and batch jobs.

Can I integrate Sentry error tracking and circuit breaker state management in my batch jobs?

Yes, you can integrate Sentry for error tracking with contextual tagging and alerts, while implementing circuit breaker state management to prevent cascading failures in batch jobs and API clients.

What is the best way to map internal error taxonomies to user-facing error messages?

The best way to map internal errors to user-facing messages is by defining a clear error taxonomy with specific categories and severity levels, ensuring safe, contextual responses without exposing internal stack traces.

When should I not use a circuit breaker pattern for error resilience?

You should avoid using a circuit breaker pattern when external API failures are non-transient or predictable, as it is designed specifically to stop cascading failures from intermittent overloads rather than handling permanent service outages.