Skip to content
affaan-m avatar

Error Handling

Patterns for typed errors, retries, circuit breakers, and user-facing failure messages across TypeScript, Python, and Go.

CCM score
71 of 100
skills.sh installs
9.1K
GitHub stars
312.6K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers error hierarchies, a no-throw Result pattern, API error handlers, React error boundaries, and Go sentinel error wrapping
  • Includes example code for Next.js, Express-style APIs, FastAPI global exception handlers, and errors.Is checks with %w wrapping
  • Enforces that every catch block handles, re-throws, or logs an error, and that unexpected errors return a generic message
  • Designed for teams building production services that need consistent failure handling and documented error codes

Install

$ npx -y skills add affaan-m/ecc --skill error-handling -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Error Handling Patterns

Consistent, robust error handling patterns for production applications.

When to Activate

  • Designing error types or exception hierarchies for a new module or service
  • Adding retry logic or circuit breakers for unreliable external dependencies
  • Reviewing API endpoints for missing error handling
  • Implementing user-facing error messages and feedback
  • Debugging cascading failures or silent error swallowing

Core Principles

  1. Fail fast and loudly — surface errors at the boundary where they occur; don't bury them
  2. Typed errors over string messages — errors are first-class values with structure
  3. User messages ≠ developer messages — show friendly text to users, log full context server-side
  4. Never swallow errors silently — every catch block must either handle, re-throw, or log
  5. Errors are part of your API contract — document every error code a client may receive

TypeScript / JavaScript

Typed Error Classes

Details

Repository
github.com/affaan-m/ecc
Categories
Backend & APIs, Code Review & Quality
First seen
Jul 14, 2026

Questions

What does the error-handling skill help with?

The error-handling skill gives patterns for robust error handling across TypeScript, Python, and Go. It covers typed errors, error boundaries, retries, circuit breakers, and user-facing error messages.

How do I install the error-handling skill?

Run npx -y skills add affaan-m/ecc --skill error-handling -y in your project. Once installed, the agent can design error types and exception hierarchies, add retries and circuit breakers, and write friendly failure messages.

Where does error-handling rank in its category?

It is listed in the Backend & APIs category on Claude Marketplaces and ranks in the top 100 there. It sits alongside skills such as neon and firebase-basics in that category.

When should I use the error-handling skill?

Use it when designing error types for a new module or service, adding retry logic for unreliable external dependencies, or reviewing API endpoints for missing error handling. It also helps debug cascading failures and silent error swallowing.

More from affaan-m/ecc

All 257

Similar to Error Handling

More Backend & APIs