Expand description
JSON:API error objects and their mapping onto HTTP status codes.
Every error a handler returns is one of these: a code, the HTTP status it maps to, and a pointer at whatever caused it. Internal errors are sanitized — the detail is dropped and only the correlation id survives, so a connection string in a data-layer error cannot reach a client.
Structs§
- Json
ApiError - An error on its way to becoming a JSON:API error object.
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.).
Enums§
- Error
Code - The JSON:API
codevalues this crate emits, and the HTTP status each carries.
Constants§
- INTERNAL_
DETAIL - The detail text sent in place of a sanitized internal error message.