ErrorHandler
 api.ErrorHandler
  object ErrorHandler
 
Provides error handling for HTTP routes in a standardised way.
The ErrorHandler wraps existing HTTP routes and ensures that:
NotFounderrors return a404status with a JSON-encodedErrorResponse.- Validation errors (e.g., 
IllegalArgumentException) return a400status. - Unexpected errors return a 
500status with a generic message. 
This utility promotes consistent error handling across the application.
Attributes
- Source
 - ErrorHandler.scala
 - Graph
 - 
    
 - Supertypes
 - 
    class Objecttrait Matchableclass Any
 - Self type
 - 
    ErrorHandler.type
 
Members list
In this article