What problem does it solve?
Build consistent, observable, and recoverable error handling for HTTP APIs so clients receive actionable error responses while services remain debuggable and resilient.
Core Features & Use Cases
- Standardized Error Responses: Consistent JSON error shape with code, message, statusCode, requestId, traceId, timestamp, and optional details for field errors.
- Observability & Monitoring: Structured logging, Sentry integration, and error-rate metrics with endpoints for exposing aggregated error stats.
- Resilience Patterns: Retry strategies with exponential backoff and jitter, circuit breaker implementation, and async route wrappers to reduce boilerplate.
- Validation & Guards: Input schema validation examples (Zod/Pydantic) and upstream response guards to prevent downstream failures.
- Use Case: Apply these practices to a Node.js Express or Python Flask service to unify 4xx/5xx handling, enable tracing, and reduce incident noise.
Quick Start
Use the api-error-handling skill to add standardized error responses, structured logging, Sentry tracking, and retry/circuit-breaker patterns to your Node.js or Python API.