set500 method
Sets a custom 500 error handler. The handler is called with the original HttpRequest and the error object as arguments. The handler is responsible for writing a response to the client and closing the request.
Implementation
void set500(Function(HttpRequest request, Object error) handler) {
_custom500 = handler;
}