Skip to main content

Module error

Module error 

Source

Structs§

Error
A structured HTTP error with status, code, message, and flexible details.
ErrorContext
Request context passed to custom error handlers for content negotiation.
ErrorHandlerRegistration
Registration entry for a custom error handler, collected via inventory.

Enums§

HttpError
All standard HTTP 4xx and 5xx error variants. Used for ergonomic error construction: HttpError::NotFound.into().

Functions§

error_handler_middleware
Middleware that intercepts Error extensions on responses and delegates to a registered custom error handler if one exists.

Type Aliases§

ErrorHandlerFn
Signature for custom error handler functions.
HandlerResult
Convenience alias for generic handler results. Defaults to Result<T, Error>, but the error type can be overridden.
JsonResult
Convenience alias for JSON API handlers. Defaults to Result<axum::Json<T>, Error>, but the error type can be overridden.