error_response

Function error_response 

Source
pub fn error_response(
    status: StatusCode,
    code: &str,
    error: impl Into<String>,
) -> Response
Expand description

Render the shared envelope. The one builder of an error body: ApiError goes through it, and so do the responses written outside a handler (the bearer layer’s 401, middleware::error_envelope).