Skip to main content

Module problem

Module problem 

Source
Expand description

RFC 7807 / RFC 9457 application/problem+json error responses. RFC 7807 / RFC 9457 application/problem+json error responses.

Provides a typed Problem struct, a Responder implementation that emits application/problem+json, and a helper that builds a default problem response from a status code. Hook the helper into Router::error_handler / Router::client_error_handler to upgrade plain text 4xx/5xx responses into structured problem documents.

Structs§

Problem
RFC 7807 / RFC 9457 problem details document.

Constants§

PROBLEM_JSON
Media type for RFC 7807 problem details.

Functions§

default_problem_responder
Default problem-formatter to be installed into Router::error_handler and/or Router::client_error_handler.