Error Design as First-Class Concern¶
Error responses are part of the API contract, not afterthoughts - well-designed errors enable clients to recover programmatically and developers to debug efficiently, while poor errors create support burden and fragile integrations.
Tension Addressed¶
Convenience vs. Performance
Recognizable As¶
Structured error responses with codes and messages, machine-readable error types, human-readable descriptions, suggested remediation, consistent error format across all endpoints
Canonical Sources¶
"REST API Design Rulebook" - Masse (2011); RFC 7807 (Problem Details for HTTP APIs)
Transfers To¶
Exception design, Compiler error messages, User interface error states, Logging and observability, Support documentation
Sub-concepts: - Error codes vs. messages: Codes enable programmatic handling; messages enable human understanding - both are necessary - Actionable errors: Errors should tell consumers what to do, not just what went wrong