Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 74 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), WorkflowTaskHistoryLimitExceeded(WorkflowTaskHistoryLimitExceeded), NonDeterministicReplay(ReplayFailure), ChildWorkflowFailed(ChildWorkflowFailure), ActivityFailed(ActivityFailure), ActivityError(ActivityError), NexusOperationFailed(Box<NexusOperationFailure>), ParallelFailed(ParallelFailure), ParallelGroupPolicyUnavailable(ParallelFailurePolicy), 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, ResponseBodyTooLarge { limit_bytes: usize, }, MissingRoleCredentials { role: &'static str, opposite_role: &'static str, }, WorkerLoop(String), UnsupportedUpdateValidators { workflow_type: String, }, UpdateRejection(UpdateRejection), UpdateValidationUnavailable(String), WorkerShutdown { primary: Box<Error>, deregistration: Box<Error>, }, InvalidChildWorkflowOptions(String), InvalidMemoUpdate(String), WorkflowMemoUpdatesUnavailable, SignalExternalWorkflowUnavailable, InvalidExternalSignal(String), UpdateStillPending(UpdatePending), UpdateOutcomeReadsUnavailable, SignalWithStartUnavailable, UnrecognizedUpdateOutcome { workflow_id: String, update_id: String, receipt: Value, }, CooperativeCancellationUnavailable(String), CancellationScopeExecutionUnavailable, InvalidCooperativeCancellation(String), ActivityExecutionAbandoned(String), WorkflowTaskFailed(WorkflowTaskFailure), WorkflowTaskInterceptor(String), InvalidActivityOptions(ActivityOptionsError), InvalidContinueAsNewOptions(ContinueAsNewOptionsError), InvalidContinueAsNewTarget, ContinueAsNewTargetUnsupported,
}

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.

§

WorkflowTaskHistoryLimitExceeded(WorkflowTaskHistoryLimitExceeded)

The Server refused a workflow-task completion because recording it would exceed its history-transaction budget. Never retried; see WorkflowTaskHistoryLimitExceeded.

§

NonDeterministicReplay(ReplayFailure)

§

ChildWorkflowFailed(ChildWorkflowFailure)

§

ActivityFailed(ActivityFailure)

§

ActivityError(ActivityError)

§

NexusOperationFailed(Box<NexusOperationFailure>)

§

ParallelFailed(ParallelFailure)

§

ParallelGroupPolicyUnavailable(ParallelFailurePolicy)

§

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

§

ResponseBodyTooLarge

A response body, after decoding (for example gzip), exceeded ClientBuilder::max_response_bytes. The rest was not read.

Fields

§limit_bytes: usize
§

MissingRoleCredentials

Fields

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

WorkerLoop(String)

§

UnsupportedUpdateValidators

A low-level workflow command contract declared update_validators that is not a list of non-empty update names.

Fields

§workflow_type: String
§

UpdateRejection(UpdateRejection)

Worker side: an update validator returned this UpdateRejection. The worker reports it to the Server as update_validator_rejected. A caller reads the Server’s answer with Error::update_validator_rejection instead.

§

UpdateValidationUnavailable(String)

The worker declares update validators, but registration cannot safely run them: a validator names an update the workflow does not handle, or the Server does not advertise synchronous pre-accept update validation with multiplexed workflow/update-validation polling.

§

WorkerShutdown

Fields

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

InvalidChildWorkflowOptions(String)

§

InvalidMemoUpdate(String)

§

WorkflowMemoUpdatesUnavailable

§

SignalExternalWorkflowUnavailable

The connected Server does not advertise the signal_external_workflow workflow-task command. Nothing was submitted. Returned to workflow code from WorkflowContext::signal_external_workflow; if the workflow returns it, the worker fails the workflow task (not the run).

§

InvalidExternalSignal(String)

WorkflowContext::signal_external_workflow was given an invalid target or signal name. Nothing was submitted.

§

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.

§

SignalWithStartUnavailable

The connected Server does not advertise signal_with_start, so the atomic intake is unavailable. Nothing was 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)

§

WorkflowTaskFailed(WorkflowTaskFailure)

The workflow-task core’s own error, as a workflow-task interceptor receives it from next. The worker reports the original error.

§

WorkflowTaskInterceptor(String)

A workflow-task interceptor broke the chain: it failed after the core succeeded, returned or failed without running next (a next.run() future that is never polled has not run), or dropped the core partway. The worker fails the workflow task; nothing is recorded and the Server retries it. On the cooperative-cancellation poller a core dropped partway is not settled: the poll returns this error and the task’s lease expires.

§

InvalidActivityOptions(ActivityOptionsError)

§

InvalidContinueAsNewOptions(ContinueAsNewOptionsError)

§

InvalidContinueAsNewTarget

A raw continue-as-new command specified an invalid build target.

§

ContinueAsNewTargetUnsupported

The current worker registration did not negotiate explicit build targets.

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 signal_with_start_refusal(&self) -> Option<String>

The Server’s refusal reason when a signal-with-start intake was refused, such as run_not_active, instance_already_started, workflow_type_conflict, task_queue_conflict, workflow_id_reserved_in_namespace, unknown_signal, invalid_signal_arguments or request_id_conflict. Nothing was started, signalled or reserved. None for any other error.

Source§

impl Error

Source

pub fn is_update_validator_rejected(&self) -> bool

Whether the workflow’s update validator rejected the update before acceptance (HTTP 422, reason: "update_validator_rejected").

Source

pub fn update_validator_rejection(&self) -> Option<UpdateValidatorRejected>

The details of an update the workflow’s validator rejected.

Source

pub fn is_update_validation_failed(&self) -> bool

Whether a validated update could not be validated, for example because no validator-capable worker answered before the Server’s deadline or the worker could not run the validator (outcome: "update_validation_failed"). Nothing was accepted. The Server’s reason and retryable fields are in the error body.

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_request_id_ambiguous(&self) -> bool

Whether the Server refused a signal or update because its caller command key matches more than one retained command, so it cannot select one receipt (HTTP 409, reason: "request_id_ambiguous").

This happens only for keys retained before the Server compared command intent, for example after an upgrade from a Server that stored keys without making them unique. Nothing was admitted or recorded and no receipt was selected. The SDK never resends this refusal, and resending it unchanged gets the same answer: inspect the workflow’s recorded signals and updates to find out what was applied, and use a new key for any new command.

Source

pub fn request_id_ambiguous(&self) -> Option<RequestIdAmbiguous>

The details of a request_id_ambiguous 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

Replaced by Error::source.
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<ActivityHeartbeatResumeUnavailable> for Error

Source§

fn from(value: ActivityHeartbeatResumeUnavailable) -> 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 UpdateRejection

Source§

fn from(error: 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<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 !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Forget for Error

§

impl Freeze for Error

§

impl Move for Error

§

impl Send for Error
where BoxRaw<Inner>: Send, &'static str: Send, RawVecInner: Send, BoxRaw<ErrorImpl>: Send, NonZero<u16>: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send, BoxRaw<NexusOperationFailure>: Send, BoxRaw<Error>: Send, NodeRef<Owned, String, String, LeafOrInternal>: Send, BoxRaw<(String, String)>: Send, NonZero<i32>: Send, Utc: Send, BoxRaw<ScopedCancellationContext>: Send, Weak<Mutex<WorkflowState>>: Send, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Send, BoxRaw<(String, Vec<String>)>: Send, Arc<FailureView>: Send, NodeRef<Owned, String, AvroValue, LeafOrInternal>: Send, BoxRaw<(String, AvroValue)>: Send,

§

impl Sync for Error
where BoxRaw<Inner>: Sync, RawVecInner: Sync, BoxRaw<ErrorImpl>: Sync, NonZero<u16>: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync, BoxRaw<NexusOperationFailure>: Sync, BoxRaw<Error>: Sync, NodeRef<Owned, String, String, LeafOrInternal>: Sync, BoxRaw<(String, String)>: Sync, NonZero<i32>: Sync, Utc: Sync, BoxRaw<ScopedCancellationContext>: Sync, Weak<Mutex<WorkflowState>>: Sync, NodeRef<Owned, String, Vec<String>, LeafOrInternal>: Sync, BoxRaw<(String, Vec<String>)>: Sync, Arc<FailureView>: Sync, NodeRef<Owned, String, AvroValue, LeafOrInternal>: Sync, BoxRaw<(String, AvroValue)>: Sync,

§

impl Unpin for Error
where Box<Inner>: Unpin, &'static str: Unpin, *const u8 is !null: Unpin, Box<ErrorImpl>: Unpin, NonZero<u16>: Unpin, *const LeafNode<String, Value> is !null: Unpin, Box<(String, Value)>: Unpin, Box<NexusOperationFailure>: Unpin, Box<Error>: Unpin, *const LeafNode<String, String> is !null: Unpin, Box<(String, String)>: Unpin, NonZero<i32>: Unpin, Utc: Unpin, Box<ScopedCancellationContext>: Unpin, *const ArcInner<Mutex<WorkflowState>> is !null: Unpin, *const LeafNode<String, Vec<String>> is !null: Unpin, Box<(String, Vec<String>)>: Unpin, Arc<FailureView>: Unpin, *const LeafNode<String, AvroValue> is !null: Unpin, Box<(String, AvroValue)>: Unpin,

§

impl UnsafeUnpin for Error
where *const Inner is !null: UnsafeUnpin, PhantomData<Inner>: UnsafeUnpin, &'static str: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, *const ErrorImpl is !null: UnsafeUnpin, PhantomData<ErrorImpl>: UnsafeUnpin, NonZeroU16Inner: UnsafeUnpin, PhantomData<Value>: UnsafeUnpin, *const LeafNode<String, Value> is !null: UnsafeUnpin, PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin, PhantomData<Box<(String, Value)>>: UnsafeUnpin, *const NexusOperationFailure is !null: UnsafeUnpin, PhantomData<NexusOperationFailure>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<ParallelGroupMetadata>: UnsafeUnpin, PhantomData<ParallelCompletion>: UnsafeUnpin, *const Error is !null: UnsafeUnpin, PhantomData<Error>: UnsafeUnpin, *const LeafNode<String, String> is !null: UnsafeUnpin, PhantomData<Box<(String, String)>>: UnsafeUnpin, NonZeroI32Inner: UnsafeUnpin, Utc: UnsafeUnpin, PhantomData<CancellationLineage>: UnsafeUnpin, *const ScopedCancellationContext is !null: UnsafeUnpin, PhantomData<ScopedCancellationContext>: UnsafeUnpin, *const ArcInner<Mutex<WorkflowState>> is !null: UnsafeUnpin, PhantomData<ScopedCancellationLineage>: UnsafeUnpin, *const LeafNode<String, Vec<String>> is !null: UnsafeUnpin, PhantomData<Box<(String, Vec<String>)>>: UnsafeUnpin, *const ArcInner<FailureView> is !null: UnsafeUnpin, PhantomData<ArcInner<FailureView>>: UnsafeUnpin, PhantomData<AvroValue>: UnsafeUnpin, *const LeafNode<String, AvroValue> is !null: UnsafeUnpin, PhantomData<Box<(String, AvroValue)>>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + 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
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + 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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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