Back
Error Handling
Patterns for surfacing actionable errors to users and logs.
Principles
- Fail fast; return typed, actionable errors.
- Never expose internal stack traces to end users.
- Map external errors to domain-specific codes.
User messages
Give next steps, not just codes: “Payment failed. Please update your card or contact support.”