Skip to main content

CallError

Enum CallError 

Source
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.

Fields

§daemon_ver: String
§

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.

Fields

§capability: String
§

CapabilityAmbiguous

More than one registered catalog entry claims a singularly requested capability.

Fields

§capability: String
§claimants: Vec<String>
§

InvalidCapabilityIdentifier

The resolver rejected a malformed capability identifier before querying the daemon.

Fields

§capability: String

Implementations§

Source§

impl CallError

Source

pub fn scope_bind_proof_refusal(&self) -> Option<ScopeBindProofRefusal>

A typed terminal scope bind-proof refusal, if the daemon returned one.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn code(&self) -> Option<&str>

Return the stable machine-readable code for typed errors.

Source

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 Debug for CallError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for CallError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for CallError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<CallError> for AppOpenError

Source§

fn from(err: CallError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameBuildError> for CallError

Source§

fn from(err: FrameBuildError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more