
Error Handling
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-codeInstalls 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
- Fail fast and loudly — surface errors at the boundary where they occur; don't bury them
- Typed errors over string messages — errors are first-class values with structure
- User messages ≠ developer messages — show friendly text to users, log full context server-side
- Never swallow errors silently — every
catchblock must either handle, re-throw, or log - 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- Flox Environments1.7K
- Frontend Design Direction1.7K
- Homelab Network Readiness1.7K
- Homelab Network Setup1.7K
- Ios Icon Gen1.7K
- Make Interfaces Feel Better1.7K
- Motion Advanced1.7K
- Motion Ui1.7K
- Netmiko Ssh Automation1.7K
- Network Bgp Diagnostics1.7K
- Network Config Validation1.7K
- Network Interface Health1.7K
- Plan Orchestrate1.7K
- Production Audit1.7K
- Project Guidelines Example1.7K
- Redis Patterns1.7K
- Scholar Evaluation1.7K
- Skill Stocktake1.7K
- Tinystruct Patterns1.7K
- Ui To Vue1.7K
- Vite Patterns1.7K
- Cost Tracking1.6K
- Fsharp Testing1.6K
- Gget1.6K