Overview
The exception handling pyramid shows the layered error handling strategy: domain exceptions at the apex (most specific, rarest), through application-level short-circuits, infrastructure resilience, HTTP status mapping, and the global exception handler as the broadest safety net at the base.
Key takeaways
- Domain exceptions map to typed
Errorobjects with stable codes (Module.Scenario.Reason) - Pipeline behaviors short-circuit on failure — preventing unnecessary work
- ProblemDetails provides structured error responses to API consumers
- The global handler ensures no exception ever results in a 500 with no body
Related
- Error Handling — detailed error handling guide
- Request Lifecycle — middleware pipeline context