handle-errors

Design error handling strategies for TypeScript and Python applications.

4|1|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/lushly-dev/afd --skill handle-errors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: handle-errors
Source: https://github.com/lushly-dev/afd/tree/main/.claude/skills/handle-errors
Command: npx skills add https://github.com/lushly-dev/afd --skill handle-errors

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive strategies and patterns to manage errors effectively in your applications, ensuring resilience and maintainability.

Core Features & Use Cases

  • Error Classification: Implement custom error hierarchies and type-safe Result/Either patterns.
  • Resilience Patterns: Integrate retry logic, exponential backoff, and circuit breakers for transient failures.
  • API Error Design: Adhere to RFC 9457 for structured, machine-readable API error responses.
  • Agent Error Recovery: Design graceful degradation and compensation patterns for AI agent workflows.
  • Observability: Set up structured logging, error tracking, and alerting for production issues.
  • Use Case: When building a microservice that calls an external API, use this Skill's patterns to implement retries with exponential backoff and a circuit breaker to prevent cascading failures.

Quick Start

Use the handle-errors skill to design a robust error handling strategy for your new microservice.

Frequently Asked Questions about handle-errors

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

FAQPage Schema
How do I implement error handling with circuit breakers and retry logic in TypeScript?

Error handling with circuit breakers and retry logic in TypeScript is implemented using resilience patterns like exponential backoff. This prevents cascading failures by temporarily blocking calls to failing services before retrying transient errors.

What is the best way to structure API errors for machine readability?

The best way to structure API errors for machine readability is following RFC 9457. This standard provides structured, machine-readable API error responses, ensuring clients can programmatically parse and handle failure states.

How does error recovery work for AI agent workflows?

Error recovery for AI agent workflows works by implementing graceful degradation and compensation patterns. This ensures that when an agent encounters a failure, it can safely roll back or adjust its execution path without corrupting the entire workflow.

Can I use Result and Either types for error classification in Python?

Yes, you can use Result and Either types for error classification in Python. This pattern allows you to return explicit success or failure states instead of throwing exceptions, creating type-safe custom error hierarchies.

When do I need structured logging and observability for application errors?

You need structured logging and observability for application errors when managing production issues. Setting up error tracking and alerts ensures that you can effectively monitor, trace, and resolve resilience failures as they occur in real-time.