pub enum ClientError {
NotFound {
detail: ErrorDetail,
},
AlreadyExists {
detail: ErrorDetail,
},
QueryFailed {
detail: ErrorDetail,
},
QueryTimeout {
detail: ErrorDetail,
},
UnknownQuery {
detail: ErrorDetail,
},
NotRunning {
detail: ErrorDetail,
},
Cancelled {
detail: ErrorDetail,
},
Unavailable {
detail: ErrorDetail,
},
Unauthenticated {
detail: ErrorDetail,
},
NamespaceDenied {
detail: ErrorDetail,
},
InvalidArgument {
detail: ErrorDetail,
},
Server {
detail: ErrorDetail,
},
}Expand description
Branchable caller-side error taxonomy shared by every aion client SDK.
Display renders <class>: <detail> where <class> is the stable string
returned by ClientError::class, aligned with the wire error codes
(not_found, namespace_denied, invalid_input, backend, …).
Variants§
NotFound
The requested workflow or run does not exist.
Fields
detail: ErrorDetailServer-supplied detail message.
AlreadyExists
A caller-supplied idempotency key conflicts with a different request.
Fields
detail: ErrorDetailConflict detail message.
QueryFailed
The workflow query handler ran and reported an application failure.
Fields
detail: ErrorDetailHandler failure detail reported by the workflow.
QueryTimeout
The workflow query exceeded its deadline.
Fields
detail: ErrorDetailDeadline detail (server window or local deadline).
UnknownQuery
The requested workflow query name is not registered.
Fields
detail: ErrorDetailServer-supplied detail naming the unknown query.
NotRunning
The target workflow is terminal or otherwise not running.
Fields
detail: ErrorDetailServer-supplied detail about the non-running target.
Cancelled
The call or target workflow was cancelled.
Fields
detail: ErrorDetailCancellation detail message.
The server or network transport is unavailable.
Unauthenticated
Authentication credentials were rejected.
Fields
detail: ErrorDetailCredential rejection detail.
NamespaceDenied
The caller’s credential was accepted, but the caller has no grant for the requested namespace.
This is exactly a namespace-grant failure. Workflow-level invisibility
— the workflow does not exist, or is owned by another namespace — is
reported as ClientError::NotFound so a cross-tenant probe is
indistinguishable from a nonexistent workflow.
Maps from the AW wire error code namespace_denied and gRPC
PERMISSION_DENIED. Distinct from ClientError::Unauthenticated
(credential rejected or unvalidatable) and from
ClientError::InvalidArgument (malformed or invalid request). Not
retryable until the caller’s grants change.
Fields
detail: ErrorDetailServer-supplied denial detail message.
InvalidArgument
The request was malformed or targets an unsupported operation state.
Fields
detail: ErrorDetailPrecise description of what was invalid and how to fix it.
Server
The server reported an unexpected internal failure.
Fields
detail: ErrorDetailInformational server detail.
Implementations§
Source§impl ClientError
impl ClientError
Sourcepub fn not_found(detail: impl Into<ErrorDetail>) -> Self
pub fn not_found(detail: impl Into<ErrorDetail>) -> Self
Creates a not-found error.
Sourcepub fn already_exists(detail: impl Into<ErrorDetail>) -> Self
pub fn already_exists(detail: impl Into<ErrorDetail>) -> Self
Creates an idempotency-conflict error.
Sourcepub fn query_failed(detail: impl Into<ErrorDetail>) -> Self
pub fn query_failed(detail: impl Into<ErrorDetail>) -> Self
Creates a query-handler failure.
Sourcepub fn query_timeout(detail: impl Into<ErrorDetail>) -> Self
pub fn query_timeout(detail: impl Into<ErrorDetail>) -> Self
Creates a query timeout.
Sourcepub fn unknown_query(detail: impl Into<ErrorDetail>) -> Self
pub fn unknown_query(detail: impl Into<ErrorDetail>) -> Self
Creates an unknown-query error.
Sourcepub fn not_running(detail: impl Into<ErrorDetail>) -> Self
pub fn not_running(detail: impl Into<ErrorDetail>) -> Self
Creates a not-running error.
Sourcepub fn cancelled(detail: impl Into<ErrorDetail>) -> Self
pub fn cancelled(detail: impl Into<ErrorDetail>) -> Self
Creates a cancellation error.
Creates a transport-unavailable error.
Sourcepub fn unauthenticated(detail: impl Into<ErrorDetail>) -> Self
pub fn unauthenticated(detail: impl Into<ErrorDetail>) -> Self
Creates a credential-rejection error.
Sourcepub fn namespace_denied(detail: impl Into<ErrorDetail>) -> Self
pub fn namespace_denied(detail: impl Into<ErrorDetail>) -> Self
Creates a namespace-grant denial.
Sourcepub fn invalid_argument(detail: impl Into<ErrorDetail>) -> Self
pub fn invalid_argument(detail: impl Into<ErrorDetail>) -> Self
Creates an ClientError::InvalidArgument carrying a precise message.
Sourcepub fn server(detail: impl Into<ErrorDetail>) -> Self
pub fn server(detail: impl Into<ErrorDetail>) -> Self
Creates an unexpected-server-failure error from a local conversion or server detail.
Sourcepub const fn class(&self) -> &'static str
pub const fn class(&self) -> &'static str
Stable taxonomy class string, aligned with the wire error codes.
Sourcepub const fn detail(&self) -> &ErrorDetail
pub const fn detail(&self) -> &ErrorDetail
The diagnostic detail carried by this error.
Sourcepub fn from_wire_error(error: WireError) -> Self
pub fn from_wire_error(error: WireError) -> Self
Converts an AW wire error into the client SDK taxonomy, preserving the
server’s message and error_type in the carried ErrorDetail.
Sourcepub fn from_proto_wire_error(error: ProtoWireError) -> Self
pub fn from_proto_wire_error(error: ProtoWireError) -> Self
Converts a proto-encoded wire error into the client SDK taxonomy.
Sourcepub fn from_status(status: &Status) -> Self
pub fn from_status(status: &Status) -> Self
Converts a tonic status into the client SDK taxonomy.
The server encodes the full typed WireError (code, message,
error_type) into the status details; when present it is
authoritative. Without decodable details the gRPC code is mapped and
the status message becomes the detail, so the server’s human detail is
never dropped.
Sourcepub fn from_transport_error(error: &Error) -> Self
pub fn from_transport_error(error: &Error) -> Self
Converts a tonic transport failure into the client SDK taxonomy, preserving the full transport error chain as the detail message.
Trait Implementations§
Source§impl Clone for ClientError
impl Clone for ClientError
Source§fn clone(&self) -> ClientError
fn clone(&self) -> ClientError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClientError
impl Debug for ClientError
Source§impl Display for ClientError
impl Display for ClientError
impl Eq for ClientError
Source§impl Error for ClientError
impl Error for ClientError
1.30.0 · 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 PartialEq for ClientError
impl PartialEq for ClientError
Source§fn eq(&self, other: &ClientError) -> bool
fn eq(&self, other: &ClientError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ClientError
Auto Trait Implementations§
impl Freeze for ClientError
impl RefUnwindSafe for ClientError
impl Send for ClientError
impl Sync for ClientError
impl Unpin for ClientError
impl UnsafeUnpin for ClientError
impl UnwindSafe for ClientError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> 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