pub struct ProtocolError {
pub message: String,
pub retriable: bool,
pub details: Option<Value>,
pub class: Option<String>,
pub retry_after_ms: Option<u64>,
}Fields§
§message: String§retriable: bool§details: Option<Value>Structured diagnostics for the failure — the machine-readable half of
message.
Worth its own field because message is prose: without this, a child
with anything structured to say has to format JSON into a sentence and
hope the reader parses it back out.
class: Option<String>What kind of failure this was, using domarinn’s error-class vocabulary
(provider_auth, provider_rate_limit, provider_timeout, …).
Without it every exec failure is indistinguishable from every other, so
a child that knows perfectly well its credential was rejected cannot say
so. Unrecognized values are kept verbatim, same as empty_reason.
retry_after_ms: Option<u64>How long to wait before retrying, in milliseconds — a Retry-After the
child received and would otherwise have to swallow. Only meaningful
alongside retriable: true.
Trait Implementations§
Source§impl Clone for ProtocolError
impl Clone for ProtocolError
Source§fn clone(&self) -> ProtocolError
fn clone(&self) -> ProtocolError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more