Expand description
HTTP error domain.
HttpError is the open trait every domain error implements; HttpException
is the type-erased box that handlers actually return. The framework’s stock
errors (NotFound, Unauthorized, BadRequest, Validation,
ServiceUnavailable, Conflict, TooManyRequests, Internal) all
implement HttpError and gain From<…> for HttpException automatically,
so handlers compose with ? regardless of which concrete error variant
they construct.
Structs§
- BadRequest
- Conflict
- Field
Error - Forbidden
- Gateway
Timeout - Http
Exception - Boxed
HttpError. Handlers returnResult<T, HttpException>;?works across any user-defined error via the blanketFrom<E: HttpError>impl. - Internal
- NotFound
- Problem
Details - Service
Unavailable - TooMany
Requests - Unauthorized
- Validation
Enums§
Traits§
- Http
Error - Every domain error type implements
HttpError. The framework converts to aProblemDetailsbody and the appropriate status code.