class
Runcobo::ErrorHandler
- Runcobo::ErrorHandler
- Reference
- Object
Overview
Turns unhandled exceptions into a response while headers can still change.
The default response matches Crystal's plain 500 Internal Server Error,
but keeps the X-Request-Id header set by LogHandler. Pass a block to
render an application-specific error body. The block receives a reset
response whose status is already 500.
Exceptions raised after headers are sent, and client disconnects, are re-raised so the server closes the interrupted connection.
Included Modules
- HTTP::Handler