#[non_exhaustive]pub enum Error {
Show 62 variants
ReplayClockUnavailable,
Transport(Error),
InvalidBaseUrl,
InvalidStaticCredential {
option: &'static str,
},
InvalidRootCertificates(String),
InvalidRawRequest(String),
InvalidPathSegment {
field: &'static str,
},
FailureReporting(FailureReportError),
Testing(TestingError),
Pagination(PaginationError),
WorkflowActivityMetadata(WorkflowActivityMetadataError),
Json(Error),
Http {
status: StatusCode,
body: String,
},
Codec(String),
QueryFailed(QueryFailure),
Protocol(ProtocolFailure),
WorkflowTaskCompletionTooLarge(WorkflowTaskCompletionTooLarge),
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,
UpdateStillPending(UpdatePending),
UpdateOutcomeReadsUnavailable,
UnrecognizedUpdateOutcome {
workflow_id: String,
update_id: String,
receipt: Value,
},
CooperativeCancellationUnavailable(String),
CancellationScopeExecutionUnavailable,
InvalidCooperativeCancellation(String),
ActivityExecutionAbandoned(String),
InvalidActivityOptions(ActivityOptionsError),
InvalidContinueAsNewOptions(ContinueAsNewOptionsError),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport(Error)
InvalidBaseUrl
InvalidStaticCredential
A supplied static credential failed validation before client construction.
InvalidRootCertificates(String)
InvalidRawRequest(String)
InvalidPathSegment
An identifier placed in a request path was empty, . or .., so it
cannot stay one path segment. Nothing was sent.
FailureReporting(FailureReportError)
Testing(TestingError)
Pagination(PaginationError)
WorkflowActivityMetadata(WorkflowActivityMetadataError)
Json(Error)
Http
Codec(String)
QueryFailed(QueryFailure)
Protocol(ProtocolFailure)
WorkflowTaskCompletionTooLarge(WorkflowTaskCompletionTooLarge)
The Server refused a workflow-task completion as larger than its
aggregate completion limit. Never retried; see
WorkflowTaskCompletionTooLarge.
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)
UpdateStillPending(UpdatePending)
An accepted update had not completed when the wait ended; it has no
result yet. See UpdatePending.
The connected Server does not advertise update_outcome_reads, so an
update outcome cannot be read by update id. Nothing was read or sent.
UnrecognizedUpdateOutcome
A successful update outcome read did not answer with a receipt for the
requested update: it lacked a matching update_id and update_status,
or claimed a finished outcome without being completed. No outcome is
returned for it.
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 can echo it. A request_id_conflict refusal always
carries it: when the Server does not echo it (native Server 3.9.0 does
not), the SDK adds the key it sent. Transport failures and other
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").
The SDK never resends this refusal, and the caller should not retry it unchanged: send the original input to recover the retained receipt, or use a new key for new input.
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.
Sourcepub fn is_update_not_found(&self) -> bool
pub fn is_update_not_found(&self) -> bool
Whether an update outcome read found no retained update with that id
for the workflow (HTTP 404, reason: "update_not_found").
That includes an update pruned with its run, so it does not prove the update was never admitted.