Skip to main content

Module error

Module error 

Source
Expand description

One error type for every handler. Spec section 12: the web side shows friendly error pages, errors inside htmx partials show inline, and a Postgres outage is a 503 page.

AppError::into_response only records what went wrong (an ErrorInfo extension); the error_pages middleware, which can see whether the request came from htmx, turns that into either a full page or an inline fragment.

Structs§

ErrorInfo
What went wrong, attached to an error response for error_pages to render.

Enums§

AppError

Functions§

error_pages
Renders ErrorInfo responses as a full page, or as an inline fragment for htmx.
is_unavailable
Connection-level failures mean Postgres is down or unreachable: a 503, not a 500.
not_found
The router’s fallback: unknown paths get the friendly 404.