Skip to content
Durable Workflowrust

Enum Error

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ReplayClockUnavailable

§

Transport(Error)

§

InvalidBaseUrl

§

InvalidStaticCredential

A supplied static credential failed validation before client construction.

Fields

§option: &'static str
§

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.

Fields

§field: &'static str
§

FailureReporting(FailureReportError)

§

Testing(TestingError)

§

Pagination(PaginationError)

§

WorkflowActivityMetadata(WorkflowActivityMetadataError)

§

Json(Error)

§

Http

Fields

§status: StatusCode
§body: String
§

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)

§

ActivityLeaseRenewalUnavailable(String)

§

WorkflowNotRegistered(String)

§

ActivityNotRegistered(String)

§

HandlerType

Fields

§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

Fields

§role: &'static str
§opposite_role: &'static str
§

WorkerLoop(String)

§

UnsupportedUpdateValidators

Fields

§workflow_type: String
§

WorkerShutdown

Fields

§primary: Box<Error>
§deregistration: Box<Error>
§

InvalidChildWorkflowOptions(String)

§

InvalidMemoUpdate(String)

§

WorkflowMemoUpdatesUnavailable

§

UpdateStillPending(UpdatePending)

An accepted update had not completed when the wait ended; it has no result yet. See UpdatePending.

§

UpdateOutcomeReadsUnavailable

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.

Fields

§workflow_id: String
§update_id: String
§receipt: Value
§

CooperativeCancellationUnavailable(String)

§

CancellationScopeExecutionUnavailable

§

InvalidCooperativeCancellation(String)

§

ActivityExecutionAbandoned(String)

§

InvalidActivityOptions(ActivityOptionsError)

§

InvalidContinueAsNewOptions(ContinueAsNewOptionsError)

Implementations§

Source§

impl Error

Source

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

Source

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.

Source

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.

Source

pub fn request_id_conflict(&self) -> Option<RequestIdConflict>

The retained-command details of a request_id_conflict refusal.

Source

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.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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<ActivityError> for Error

Source§

fn from(source: ActivityError) -> Self

Converts to this type from the input type.
Source§

impl From<ConditionWaitOptionsError> for Error

Source§

fn from(source: ConditionWaitOptionsError) -> Self

Converts to this type from the input type.
Source§

impl From<ContinueAsNewOptionsError> for Error

Source§

fn from(source: ContinueAsNewOptionsError) -> Self

Converts to this type from the input type.
Source§

impl From<DuplicateRegistrationError> for Error

Source§

fn from(error: DuplicateRegistrationError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FailureReportError> for Error

Source§

fn from(source: FailureReportError) -> Self

Converts to this type from the input type.
Source§

impl From<PaginationError> for Error

Source§

fn from(source: PaginationError) -> Self

Converts to this type from the input type.
Source§

impl From<SearchAttributeUpdateError> for Error

Source§

fn from(source: SearchAttributeUpdateError) -> Self

Converts to this type from the input type.
Source§

impl From<TestingError> for Error

Source§

fn from(source: TestingError) -> Self

Converts to this type from the input type.
Source§

impl From<WorkflowActivityMetadataError> for Error

Source§

fn from(source: WorkflowActivityMetadataError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

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.

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

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

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

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.

§

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

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
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 = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,