affaan-m avatar

Error Handling

This is a well-structured reference for production error handling patterns across TypeScript, Python, and Go. You get typed error hierarchies, the Result pattern for no-throw code paths, API error handlers for Next.js and FastAPI, React error boundaries, and Go's sentinel error wrapping. The examples are opinionated in the right ways: fail fast, never swallow errors silently, separate user-facing messages from logs, and treat error codes as part of your API contract. Activate this when you're adding retry logic, reviewing endpoints for missing error cases, or debugging cascading failures. The cross-language coverage is genuinely useful if you work in polyglot codebases or want consistent patterns across services.

skills.sh installs
5.8K
GitHub stars
300.3K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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

Sponsors

Details

Repository
github.com/affaan-m/ecc
Categories
Debugging, Python
First seen
Jul 14, 2026

More from affaan-m/ecc

All 263

Recommended

More Debugging
1affaan-m avataragent-introspection-debuggingaffaan-m/eccStructured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports.5.7Kskills.sh installs
2giuseppe-trisciuoglio avatarnextjs-performancegiuseppe-trisciuoglio/developer-kitExpert Next.js performance optimization skill covering Core Web Vitals, image/font optimization, caching strategies, streaming, bundle optimization, and Server 5Kskills.sh installs
3actionbook avatarm06-error-handlingactionbook/rust-skillsCRITICAL: Use for error handling. Triggers: Result, Option, Error, ?, unwrap, expect, panic, anyhow, thiserror, when to panic vs return Result, custom error, er3.7Kskills.sh installs
4copilotkit avatarcopilotkit-debugcopilotkit/copilotkitUse when diagnosing CopilotKit issues -- runtime connectivity failures, agent not responding, streaming errors, tool execution problems, transcription failures,2.8Kskills.sh installs
5cursor avatarfix-cicursor/pluginsFind failing PR checks, inspect logs or external check links, and apply focused fixes2.5Kskills.sh installs
6owl-listener avatarerror-handling-uxowl-listener/designer-skillsDesign error prevention, detection, and recovery experiences.2.4Kskills.sh installs