Skip to main content

Module problem

Module problem 

Source
Expand description

RFC 9457 application/problem+json error responses.

Problem — the transport-neutral error DATA — lives in seiva-contract (ADR 0003), so a module’s facade can map its error to a Problem without depending on this HTTP crate. This module re-exports it and provides ProblemResponse, the axum IntoResponse wrapper that renders a Problem as application/problem+json. Every extractor rejection and middleware response in this crate wraps the Problem in a ProblemResponse, and the #[seiva::controller] macro does the same at the HTTP edge.

Structs§

Problem
An RFC 9457 problem detail: a machine-readable description of an error.
ProblemResponse
The axum IntoResponse wrapper around a transport-neutral Problem.

Constants§

PROBLEM_JSON
The media type mandated by RFC 9457 for a problem document.

Functions§

expose_error_details
Whether internal error detail is currently exposed to clients.
set_expose_error_details
Sets whether internal error detail is exposed to clients. Called once by the runtime at boot from the validated SEIVA_EXPOSE_ERROR_DETAILS config value. A development convenience; production must leave it off (fail-closed default).