Expand description
Typed API errors for proper HTTP/gRPC status code mapping
Enums§
- ApiError
- API error types that can be downcast at the HTTP/gRPC boundary
- Availability
Error - Marker errors for availability endpoint failures. These are wrapped in
anyhow::Errorby the state implementation and downcasted in the Axum handlers to select the right HTTP status code.
Functions§
- classify
- Errors raised as
AvailabilityErrorby a state implementation carry semantic meaning; anything else is a failure the client cannot act on. Both transports classify through here, so v1 and v2 cannot drift on what counts as a 404. - to_
status - Render a handler error for the v2 transports: the gRPC
grpc-messagetrailer and, viatonic_rest::RestError, the REST error body. Classification and the credential scrub happen inclassifyandApiError’sDisplay, shared with the v1 path.