Skip to main content

Module error

Module error 

Source
Expand description

RFC 9457 Problem Details for HTTP APIs.

Every error path in the server returns application/problem+json so that cellctl (and the web UI) can render structured diagnostics without parsing free-form strings. The type field is a stable identifier — clients may switch on it; the title/detail fields are human-readable and may change.

Structs§

AppError

Enums§

AppErrorKind
Stable error identifier. Adding a variant is a non-breaking change; renaming one IS breaking (clients pin on type).

Constants§

PROBLEM_JSON_CT
Media type identifier per RFC 9457 §3.

Functions§

normalize_problem_response
FUZZ-WAVE-1 MED-1 / MED-2: response-mapping middleware that guarantees every 4xx leaving the server carries Content-Type: application/problem+json (RFC 9457 §3).
problem_response
Build a problem+json response from a kind + detail string, bypassing the full AppError construction path. Used by fallbacks and the rejection-normalising middleware where we already know the status.