Skip to main content

Module error

Module error 

Source
Expand description

gRPC → HTTP error mapping.

Converts tonic::Status to appropriate HTTP status codes and JSON error bodies following the gRPC-HTTP status code mapping from the gRPC specification.

Functions§

grpc_to_http_status
Map a gRPC status code to the corresponding HTTP status code.
status_to_response
Convert a tonic::Status into an axum HTTP response with JSON error body.