Skip to main content

status_to_response

Function status_to_response 

Source
pub fn status_to_response(status: Status) -> Response
Expand description

Convert a tonic::Status into an axum HTTP response with a JSON error body {"error", "message", "code"}, without status details.

Use status_to_response_with_details to also render the upstream’s google.rpc.Status details.