error-handling

Classify and standardize error handling across Python and TypeScript applications.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/saajunaid/junai --skill error-handling-saajunaid
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/saajunaid/junai/tree/main/.github/skills/coding/error-handling
Command: npx skills add https://github.com/saajunaid/junai --skill error-handling-saajunaid

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Errors are not exceptional — they are part of the contract. This skill defines how to classify, propagate, and recover from errors consistently.

Core Features & Use Cases

  • Classify errors into Transient, Operational, and Fatal, with guidance on retry, user action, and escalation.
  • Provide domain-specific exceptions for Python and TypeScript, including patterns for retry, circuit breakers, and structured logging.
  • Include usage patterns for common frameworks (like FastAPI) and best practices for error boundaries, logging, and safe API responses.

Quick Start

To implement consistent error handling in your project, start by designing a small set of domain exceptions and integrate with your existing error-handling flow.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I standardize error handling across Python and TypeScript applications?

For FastAPI and Express error handling, this approach provides framework-aware error responses, structured logging, and domain-specific exceptions to ensure consistent API error propagation and recovery across both web frameworks.

How do I implement retry policies and circuit breakers for API errors?

Implementing retry policies and circuit breakers for API errors involves classifying Transient errors for automatic retry with backoff, while applying circuit breaker patterns to prevent cascading failures in Python and TypeScript services.

What is the best way to structure a domain-specific exception hierarchy?

A domain-specific exception hierarchy should classify errors into Transient, Operational, and Fatal tiers, guiding whether to retry, request user action, or escalate, ensuring structured logging and clear recovery across your application.

Does this error handling approach work for both library and API service development?

Yes, this error handling approach works for library and API service development by providing a standardized error contract, applying consistent exception hierarchies, retry policies, and user-friendly messages across Python and TypeScript projects.

When should I use fatal vs operational error classification in my application?

Use fatal error classification when errors require system escalation, and operational classification when errors require user action. Transient errors trigger retry logic, ensuring appropriate recovery paths within your domain-specific exception hierarchy.