error-handling

Implement error handling, structured logging, and resilience patterns across Python, JavaScript, and Go.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of building robust and reliable applications by providing comprehensive strategies for handling errors, managing exceptions, and implementing effective logging and resilience patterns.

Core Features & Use Cases

  • Exception Management: Design custom exception hierarchies and handle errors gracefully.
  • Logging Best Practices: Implement structured logging for better observability.
  • Resilience Patterns: Utilize retries and circuit breakers to ensure application stability.
  • Use Case: When developing a web API, ensure that all errors are caught, logged with sufficient context, and returned to the client with appropriate HTTP status codes, preventing unexpected crashes and providing clear feedback.

Quick Start

Use the error-handling skill to generate Python code for custom exception classes and a FastAPI error handler.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I implement structured logging for better API error observability?

Structured logging for API error observability is implemented using libraries like structlog or pino to capture error context in a structured format. This approach ensures errors are caught and logged with sufficient context for clear feedback.

What is the best way to design custom exception hierarchies in Python?

Designing custom exception hierarchies in Python involves creating specialized exception classes that capture specific domain errors. This allows backend applications to manage exceptions gracefully and prevent unexpected crashes during execution.

How do I add resilience patterns like retries with backoff to my backend application?

Adding resilience patterns like retries with backoff involves implementing specific fault-tolerant mechanisms within your application architecture. These patterns ensure application stability by automatically retrying failed operations with increasing delays.

Does this error handling guidance work for both Python and JavaScript/TypeScript?

Yes, this error handling guidance works across multiple programming languages including Python, JavaScript/TypeScript, and Go. It provides applicable strategies for backend development and API design in these diverse environments.

How does a circuit breaker pattern prevent cascading failures in distributed systems?

A circuit breaker pattern prevents cascading failures in distributed systems by halting requests to a failing service temporarily. This fault-tolerant mechanism ensures application stability and resilience when external dependencies become unresponsive.

How do I return appropriate HTTP status codes when handling web API errors?

Returning appropriate HTTP status codes when handling web API errors requires catching exceptions and mapping them to correct response codes. This ensures clear feedback is provided to the client while preventing unexpected application crashes.