Skip to main content

fail

Function fail 

Source
fn fail(json: bool, code: StatusCode, message: &str) -> Response
Expand description

An error in the encoding the client asked for.

OTLP wants a google.rpc.Status; for the JSON case that is a two-field object, and hand-writing it costs less than a serializer. The protobuf case keeps returning text — encoding a Status there means another generated type for a path no exporter parses.