httpErrorHandler function
Implementation
void httpErrorHandler(HttpRequest req, Object? error, StackTrace stackTrace) {
/// `schema.parse()` in a controller: answer 422 like `req.validate()`
if (error is dv.ValidationException) {
error = ValidationException(message: error.errors);
}
if (error is Exception || error is Error) {
Dox().config.errorHandler(error, stackTrace);
}
httpResponseHandler(error, req);
}