Format a Throwable as a JSON value.
Format a Throwable as a JSON value.
Override this method if you want to change how exceptions are rendered in Dev mode.
Responsible for logging server errors.
Responsible for logging server errors.
This can be overridden to add additional logging information, eg. the id of the authenticated user.
The request that triggered the server error.
The server error.
Invoked when a client error occurs, that is, an error in the 4xx series.
Invoked when a client error occurs, that is, an error in the 4xx series.
The request that caused the client error.
The error status code. Must be greater or equal to 400, and less than 500.
The error message.
Invoked when a server error occurs.
Invoked when a server error occurs.
The request that triggered the server error.
The server error.
An alternative default HTTP error handler which will render errors as JSON messages instead of HTML pages.
In Dev mode, exceptions thrown by the server code will be rendered in JSON messages. In Prod mode, they will not be rendered.
You could override how exceptions are rendered in Dev mode by extending this class and overriding the formatDevServerErrorException method.