Response.serverError constructor
Response.serverError(
- Request request,
- dynamic exception,
- dynamic stackTrace
Initialize a newly created instance to represent the SERVER_ERROR error condition.
Implementation
factory Response.serverError(Request request, exception, stackTrace) {
var error =
RequestError(RequestErrorCode.SERVER_ERROR, exception.toString());
if (stackTrace != null) {
error.stackTrace = stackTrace.toString();
}
return Response(request.id, error: error);
}