error-handling

Implement typed errors, boundary translation, and retry policies across modules.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/mechemsi/claude-template --skill error-handling-mechemsi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/mechemsi/claude-template/tree/main/skills/error-handling
Command: npx skills add https://github.com/mechemsi/claude-template --skill error-handling-mechemsi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Errors are a first-class part of software; poorly handled errors cause silent failures, confusing UX, and brittle systems.

Core Features & Use Cases

  • Typed errors and explicit failure modes at boundaries
  • Boundary translation to user-friendly messages and stable APIs
  • Retry and circuit-breaker strategies for transient failures

Quick Start

Audit a failing function and implement typed errors with boundary translation for a simple retryable operation.

Frequently Asked Questions about error-handling

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

FAQPage Schema
How do I design error handling for API boundaries and domain logic?

Design error handling for API boundaries by enforcing typed errors and explicit failure modes. Translate internal domain errors into user-friendly messages at boundaries to maintain stable APIs and prevent silent failures across modules.

What is the best way to implement retry and circuit breaker strategies for transient failures?

Implement retry and circuit breaker strategies by defining policies that detect transient failures and halt traffic when a downstream service becomes unavailable. This prevents cascading failures and allows systems to recover gracefully without overwhelming resources.

How do I translate internal typed errors into safe user-facing messages?

Translate typed errors into safe user-facing messages through boundary translation. Map internal domain-specific error types to stable, generalized API responses, ensuring that sensitive internal state or stack traces are never exposed to the end user.

Why does poorly handled error logic cause silent failures and brittle systems?

Poorly handled error logic causes silent failures and brittle systems because untyped or swallowed exceptions bypass normal control flow. Without explicit typed errors, failures remain undetected, leading to confusing UX and unpredictable application state.

Can I audit a failing function to implement typed errors and boundary translation?

Yes, you can audit a failing function to implement typed errors and boundary translation. Identify existing failure modes, define explicit typed errors, and apply boundary translation to convert internal exceptions into safe, retryable operations.

When do I need typed errors instead of generic exception handling?

You need typed errors instead of generic exception handling when operating across module boundaries or API layers. Typed errors enforce explicit failure modes, making error handling predictable and enabling precise boundary translation for user-facing messages.