error-handling

Standardize error types, RFC 7807 responses, and JSON structured logging.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/dhruvinrsoni/agentskills-garden --skill error-handling-dhruvinrsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/dhruvinrsoni/agentskills-garden/tree/main/skills/30-implementation/error-handling
Command: npx skills add https://github.com/dhruvinrsoni/agentskills-garden --skill error-handling-dhruvinrsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the chaos of inconsistent error management by establishing standardized error types, logging formats, and response structures across your entire project.

Core Features & Use Cases

  • Consistent Error Taxonomy: Defines clear categories for errors (validation, auth, not found, etc.) with associated HTTP status codes.
  • Standardized Responses: Implements RFC 7807 Problem Details for predictable API error outputs.
  • Structured Logging: Ensures all logs are in JSON format with essential fields for easier analysis.
  • Resilience Patterns: Integrates retry logic with exponential backoff and circuit breakers for external service calls.
  • Use Case: When a user submits invalid data, the API consistently returns a 400 error with a clear detail explaining the issue, rather than a cryptic internal server error.

Quick Start

Configure the project's error handling strategy by defining error classes, response formats, and structured logging.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I standardize API error responses using RFC 7807 Problem Details?

Structured error logging uses JSON format with essential fields for easier analysis and observability. It ensures all application logs capture consistent error context, replacing inconsistent patterns with searchable, machine-readable log entries.

What is the best way to add resilience patterns for external service calls?

Add resilience patterns by integrating retry logic with exponential backoff and circuit breakers for external service calls. This prevents cascading failures and automatically recovers transient errors, satisfying robust API management requirements.

How do I define a consistent error taxonomy for validation and auth failures?

Define a consistent error taxonomy by creating base error classes for specific categories like validation, auth, and not found. Each class maps to associated HTTP status codes, standardizing error management across the entire application.

When do I need structured JSON logging for application errors?

Structured JSON logging is needed when you require easier analysis and observability for application errors. It ensures all logs capture essential fields in a consistent JSON format, replacing inconsistent patterns with searchable, machine-readable log entries.