pub enum DialError {
InvalidAddress {
addr: String,
source: InvalidUri,
},
Tls(String),
Connect(ConnectError),
InvalidBearer(String),
MissingIngressCredentials,
InvalidIngressReceipt(&'static str),
InvalidApprovalRecovery(&'static str),
}Expand description
Errors an agent dial can produce.
Variants§
InvalidAddress
Could not parse the configured agent address as a URI.
Fields
source: InvalidUriThe underlying URI parse error.
Tls(String)
Building the TLS client for an https:// endpoint failed (e.g. no
process-default crypto provider). The dial fails closed rather than
silently downgrading to plaintext.
Connect(ConnectError)
Connect-level error from the AgentService stream.
InvalidBearer(String)
A bearer credential could not be encoded as an HTTP header value
(e.g. contains a newline or non-ASCII byte). Produced by
AgentDialer::with_credentials, PersonaDialer::new_admin,
CredentialDialer::new_admin, and RoutineDialer::fire_routine’s
admin path. Fails the dial closed rather than silently sending the
turn unauthenticated.
MissingIngressCredentials
A turn ingress was attempted with an unauthenticated dialer.
Stable source identity rides only inside the signed edge envelope, so sending without credentials would necessarily drop the identity and is refused before transport I/O.
InvalidIngressReceipt(&'static str)
The server returned a success response that cannot prove the requested source event was durably received.
InvalidApprovalRecovery(&'static str)
The recovery service returned an entry without one of its required states.
Implementations§
Source§impl DialError
impl DialError
Sourcepub const fn code(&self) -> Option<ErrorCode>
pub const fn code(&self) -> Option<ErrorCode>
The Connect error code, when this is a transport-level Connect error
(None for local address/TLS-setup/credential failures).
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Whether retrying the call could plausibly succeed. Only transient
transport conditions are retryable; terminal codes
(InvalidArgument, Unauthenticated, NotFound, …) and local
address/TLS failures are not. Edges use this to decide whether to ask
the source platform to redeliver (retryable) or to drop / 4xx
(terminal — redelivery would loop forever).
Sourcepub const fn is_deadline_exceeded(&self) -> bool
pub const fn is_deadline_exceeded(&self) -> bool
Whether this error is a DeadlineExceeded — the call’s deadline
elapsed rather than anything failing.
A long-lived stream that is idle by design (NotificationDialer::subscribe)
ends this way on every cycle, so its caller reports the recycle as routine
instead of as a failure. Callers of short unary RPCs should keep treating
it as an error.
The subscribe stream carries a deadline it cannot be exempted from where it is currently mounted, so reaching that deadline is the normal cycle, not a failure — reporting it as one buries the case where the notifier is genuinely broken (#1794).
Sourcepub const fn is_stale_capability(&self) -> bool
pub const fn is_stale_capability(&self) -> bool
Whether a signed human-action capability is absent, expired, or no longer matches the durable occurrence it names.
Approval edges use this to retire a stale card instead of inviting a
deterministic retry. The server reports malformed/expired capability
tokens as Unauthenticated and an occurrence that can no longer be
answered as FailedPrecondition.
Trait Implementations§
Source§impl Error for DialError
impl Error for DialError
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()
Source§impl From<ConnectError> for DialError
impl From<ConnectError> for DialError
Source§fn from(source: ConnectError) -> Self
fn from(source: ConnectError) -> Self
Auto Trait Implementations§
impl Freeze for DialError
impl RefUnwindSafe for DialError
impl Send for DialError
impl Sync for DialError
impl Unpin for DialError
impl UnsafeUnpin for DialError
impl UnwindSafe for DialError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request