Skip to content
bitzorcas
EN

Concept

Exception Handling Hierarchy

Layered error handling from domain exceptions through to HTTP status code mapping.

Last updated

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 Error objects 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