Skip to main content

refusal

Function refusal 

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

The {"error": .., "message": ..} shape every route here refuses in.

Boxed by the callers that return it from a Result: a refusal is the cold path, and an axum Response is large enough that returning one by value makes every success pay for it.