This is a comprehensive reference for production error handling across TypeScript, Python, and Go. You get typed error hierarchies instead of string throwing, Result pattern implementations for expected failures, and proper error wrapping that preserves context up the stack. The TypeScript section includes Next.js API handlers and React error boundaries. Python covers FastAPI global handlers. Go shows sentinel errors and fmt.Errorf wrapping. The real value is in the opinionated principles: fail fast, never swallow silently, and separate user-facing messages from developer logs. Useful when you're setting up a new service and want consistent error contracts, or when debugging why errors disappear into the void.

skills.sh installs
1.7K
GitHub stars
229.1K
last updated
Jul 14, 2026

Install

$ npx -y skills add affaan-m/everything-claude-code --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/everything-claude-code
Category
Debugging
First seen
Jun 3, 2026

More from affaan-m/everything-claude-code

All 256

Recommended

More Debugging
1nickcrew avatarreact-performance-optimizationnickcrew/claude-ctx-pluginreact performance optimization1.7Kskills.sh installs
2rudrankriyam avatarasc-crash-triagerudrankriyam/app-store-connect-cli-skillsasc crash triage1.7Kskills.sh installs
3jaganpro avatarsf-debugjaganpro/sf-skillssf debug1.5Kskills.sh installs
4sickn33 avatarsystematic-debuggingsickn33/antigravity-awesome-skillssystematic debugging1.3Kskills.sh installs
5cxuu avatargo-performancecxuu/golang-skillsUse when optimizing Go code, investigating slow performance, or writing performance-critical sections. Also use when a user mentions slow Go code, string concat1.3Kskills.sh installs
6flutter avatarflutter-performanceflutter/skillsflutter performance1.2Kskills.sh installs