#[non_exhaustive]pub enum Error {
Show 54 variants
Transport(Error),
InvalidBaseUrl,
InvalidRootCertificates(String),
InvalidRawRequest(String),
FailureReporting(FailureReportError),
Testing(TestingError),
Pagination(PaginationError),
Json(Error),
Http {
status: StatusCode,
body: String,
},
Codec(String),
QueryFailed(QueryFailure),
Protocol(ProtocolFailure),
NonDeterministicReplay(ReplayFailure),
ChildWorkflowFailed(ChildWorkflowFailure),
ActivityFailed(ActivityFailure),
ActivityError(ActivityError),
NexusOperationFailed(Box<NexusOperationFailure>),
ParallelFailed(ParallelFailure),
SagaCompensationFailed(SagaCompensationFailure),
InvalidParallelGroup(ParallelGroupError),
DurableOperationCancelled(DurableOperationCancelled),
WorkflowCancellationRequested(WorkflowCancellationRequested),
CooperativeCancellationRequested(CooperativeCancellationRequested),
CancellationScopeRequested(CancellationScopeRequested),
WorkflowCommandRejected(WorkflowCommandRejection),
WorkflowFailed(WorkflowTerminalOutcome),
WorkflowCancelled(WorkflowTerminalOutcome),
WorkflowTerminated(WorkflowTerminalOutcome),
WorkflowTimedOut(WorkflowTerminalOutcome),
ActivityTaskRejected(ActivityTaskRejection),
ActivityLeaseRenewalUnavailable(String),
WorkflowNotRegistered(String),
ActivityNotRegistered(String),
HandlerType {
handler_kind: HandlerKind,
handler_name: String,
value_kind: HandlerValueKind,
rust_type: &'static str,
message: String,
},
WorkflowYieldedWithoutCommand,
MissingWorkflowCommandIdentity,
WorkflowStatePoisoned,
TimerDurationOverflow,
InvalidConditionWaitOptions(ConditionWaitOptionsError),
InvalidSearchAttributeUpdate(SearchAttributeUpdateError),
Timeout,
MissingRoleCredentials {
role: &'static str,
opposite_role: &'static str,
},
WorkerLoop(String),
UnsupportedUpdateValidators {
workflow_type: String,
},
WorkerShutdown {
primary: Box<Error>,
deregistration: Box<Error>,
},
InvalidChildWorkflowOptions(String),
InvalidMemoUpdate(String),
WorkflowMemoUpdatesUnavailable,
CooperativeCancellationUnavailable(String),
CancellationScopeExecutionUnavailable,
InvalidCooperativeCancellation(String),
ActivityExecutionAbandoned(String),
InvalidActivityOptions(ActivityOptionsError),
InvalidContinueAsNewOptions(ContinueAsNewOptionsError),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport(Error)
InvalidBaseUrl
InvalidRootCertificates(String)
InvalidRawRequest(String)
FailureReporting(FailureReportError)
Testing(TestingError)
Pagination(PaginationError)
Json(Error)
Http
Codec(String)
QueryFailed(QueryFailure)
Protocol(ProtocolFailure)
NonDeterministicReplay(ReplayFailure)
ChildWorkflowFailed(ChildWorkflowFailure)
ActivityFailed(ActivityFailure)
ActivityError(ActivityError)
NexusOperationFailed(Box<NexusOperationFailure>)
ParallelFailed(ParallelFailure)
SagaCompensationFailed(SagaCompensationFailure)
InvalidParallelGroup(ParallelGroupError)
DurableOperationCancelled(DurableOperationCancelled)
WorkflowCancellationRequested(WorkflowCancellationRequested)
CooperativeCancellationRequested(CooperativeCancellationRequested)
CancellationScopeRequested(CancellationScopeRequested)
WorkflowCommandRejected(WorkflowCommandRejection)
WorkflowFailed(WorkflowTerminalOutcome)
WorkflowCancelled(WorkflowTerminalOutcome)
WorkflowTerminated(WorkflowTerminalOutcome)
WorkflowTimedOut(WorkflowTerminalOutcome)
ActivityTaskRejected(ActivityTaskRejection)
WorkflowNotRegistered(String)
ActivityNotRegistered(String)
HandlerType
WorkflowYieldedWithoutCommand
MissingWorkflowCommandIdentity
WorkflowStatePoisoned
TimerDurationOverflow
InvalidConditionWaitOptions(ConditionWaitOptionsError)
InvalidSearchAttributeUpdate(SearchAttributeUpdateError)
Timeout
MissingRoleCredentials
WorkerLoop(String)
UnsupportedUpdateValidators
WorkerShutdown
InvalidChildWorkflowOptions(String)
InvalidMemoUpdate(String)
InvalidCooperativeCancellation(String)
ActivityExecutionAbandoned(String)
InvalidActivityOptions(ActivityOptionsError)
InvalidContinueAsNewOptions(ContinueAsNewOptionsError)
Implementations§
Source§impl Error
impl Error
Sourcepub fn refusal(&self) -> Option<HttpRefusal>
pub fn refusal(&self) -> Option<HttpRefusal>
Decode a Server refusal from Error::Http or Error::Protocol.
Returns None for other errors and for HTTP errors whose body is not
a JSON object.
Source§impl Error
impl Error
Sourcepub fn request_id(&self) -> Option<String>
pub fn request_id(&self) -> Option<String>
The caller command key echoed by the Server in a refusal body.
Signals and updates send their key as the request_id body field, and a
Server refusal such as request_id_conflict echoes it. Transport failures
and refusals without an echoed key return None: keep the key you passed
to a *_with_request_id method, or obtained from
Client::generate_signal_request_id or
Client::generate_update_request_id, to retry the same logical command
after an uncertain outcome.
Sourcepub fn is_request_id_conflict(&self) -> bool
pub fn is_request_id_conflict(&self) -> bool
Whether the Server refused a signal or update because its caller command
key is retained for a command with a different intent
(HTTP 409, reason: "request_id_conflict").
Sourcepub fn request_id_conflict(&self) -> Option<RequestIdConflict>
pub fn request_id_conflict(&self) -> Option<RequestIdConflict>
The retained-command details of a request_id_conflict refusal.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()