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.
- Problem
Response - The axum
IntoResponsewrapper around a transport-neutralProblem.
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_DETAILSconfig value. A development convenience; production must leave it off (fail-closed default).