toResponse method

Response toResponse()

Converts the error to an HTTP response.

Implementation

Response toResponse() {
  return Response(body, ResponseInit(status: status, headers: headers));
}