Patterns for robust error handling across TypeScript, Python, and Go. Covers typed errors, error boundaries, retries, circuit breakers, and user-facing error…
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 catch block must either handle, re-throw, or log Errors are part of your API contract — document every error code a client may receive
don't have the plugin yet? install it then click "run inline in claude" again.