pub enum CallError {
DaemonTooOld {
daemon_ver: String,
},
NotSent(Box<dyn Error + Send + Sync>),
OutcomeUnknown(Box<dyn Error + Send + Sync>),
Module(ErrorBody),
SubscriptionBackpressure(Box<dyn Error + Send + Sync>),
StaleRouteHandle(RouteHandle),
CapabilityUnprovided {
capability: String,
},
CapabilityAmbiguous {
capability: String,
claimants: Vec<String>,
},
InvalidCapabilityIdentifier {
capability: String,
},
}Expand description
Managed call or subscription failure.
Variants§
DaemonTooOld
Local compatibility policy refusal: the version retained from the
connection file for this connection is not an exact numeric
major.minor.patch version at least 0.39.0. Unrecognized strings,
including prereleases and build suffixes, are refused too. This
route-open attempt was refused before being queued for writing.
The handshake authenticates the daemon ID, not this version metadata.
NotSent(Box<dyn Error + Send + Sync>)
A pre-send failure, proven non-delivery, or unusable reply or internal completion.
Check CallError::never_forwarded before treating the whole call as safe to resend.
OutcomeUnknown(Box<dyn Error + Send + Sync>)
The request body was accepted by the writer path, but no terminal response was observed.
Module(ErrorBody)
The target module handler returned an Error frame. Application-level rejections are returned as ordinary successful response bytes and do not produce this variant.
SubscriptionBackpressure(Box<dyn Error + Send + Sync>)
A subscription event receiver stopped keeping up with its bounded channel.
The reader task must never await a slow consumer while it is dispatching frames for the whole connection, so a full event channel terminates only that subscription.
StaleRouteHandle(RouteHandle)
The handle belongs to an earlier connection and no frame was emitted.
CapabilityUnprovided
No registered catalog entry claims the requested capability.
CapabilityAmbiguous
More than one registered catalog entry claims a singularly requested capability.
InvalidCapabilityIdentifier
The resolver rejected a malformed capability identifier before querying the daemon.
Implementations§
Source§impl CallError
impl CallError
Sourcepub fn scope_bind_proof_refusal(&self) -> Option<ScopeBindProofRefusal>
pub fn scope_bind_proof_refusal(&self) -> Option<ScopeBindProofRefusal>
A typed terminal scope bind-proof refusal, if the daemon returned one.
Sourcepub fn close_reason(&self) -> Option<&RouteEndReason>
pub fn close_reason(&self) -> Option<&RouteEndReason>
Why the route ended. The error remains NotSent or OutcomeUnknown:
this reason never makes a sent call safe to resend.
Sourcepub fn terminal(&self) -> Option<bool>
pub fn terminal(&self) -> Option<bool>
The daemon’s recovery verdict from route.closed, if it carried one.
Some(true) means the daemon will leave the module down until an operator
acts. None means unknown: older daemons, client-side ends and non-route
errors have no verdict. This flag does not change resend safety or the
close reason’s reopen disposition.
Sourcepub fn outcome_cause(&self) -> Option<OutcomeUnknownCause>
pub fn outcome_cause(&self) -> Option<OutcomeUnknownCause>
Why the outcome is unknown, without parsing the error’s message.
Errors constructed outside this crate with an untyped source return None.
Sourcepub fn not_sent_cause(&self) -> Option<NotSentCause>
pub fn not_sent_cause(&self) -> Option<NotSentCause>
Why the final attempt was classified as NotSent, without parsing its message.
Returns None for other variants and externally constructed untyped errors.
Sourcepub fn never_forwarded(&self) -> Option<bool>
pub fn never_forwarded(&self) -> Option<bool>
Whether no attempt of this call may have reached the module.
Some(false) means this or an earlier attempt may have been forwarded.
For data-plane errors, only daemon-marked refusals prove non-delivery;
unmarked replies remain conservative on older daemons. Managed calls
include every attempt. Returns None except for crate-built NotSent errors.
Sourcepub fn route_open_refusal(&self) -> Option<&ErrorBody>
pub fn route_open_refusal(&self) -> Option<&ErrorBody>
The daemon’s refusal body when this failure is a route.open the daemon
refused, with its code, message and machine-readable detail
intact, for example module_warming with
detail.reason = "required_capability_unprovided".
When retryable refusals ran out the route-retry deadline, this is the
most informative refusal seen during the retries, so a caller can tell
“the module was reloading” from “the connection failed”. Refusals rank:
module_reloading / module_warming, then delegation_not_registered,
then admission pressure (too many binds in flight), then anything else;
at equal rank the later one wins. The failure is still NotSent: a
refused route.open never delivered the request.
Trait Implementations§
Source§impl Error for CallError
impl Error for CallError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()