Skip to main content

problem_response_with_options

Function problem_response_with_options 

Source
pub fn problem_response_with_options(
    status: u16,
    slug: &str,
    title: &str,
    detail: impl Into<String>,
    instance: &str,
    errors: Vec<FieldError>,
    ok: Option<bool>,
    extra: Vec<(String, String)>,
) -> HttpResponse
Expand description

Build an RFC 9457 application/problem+json response with optional field errors, transition ok: false flag, and extra HTTP headers (such as Allow or Retry-After).