Skip to main content

WorkflowError

Enum WorkflowError 

Source
pub enum WorkflowError {
Show 15 variants DuplicateTaskId(String), TaskNotFound(String), TaskNotImplemented(String), DefinitionMismatch { expected: String, found: String, }, Cancelled { reason: Option<String>, cancelled_by: Option<String>, }, Paused { reason: Option<String>, paused_by: Option<String>, }, EmptyFork, TaskPanicked(String), ResumeError(String), Deserialization(String), BranchNotFound(String), Waiting { wake_at: DateTime<Utc>, }, TaskTimedOut { task_id: String, timeout: Duration, }, AwaitingSignal { signal_id: String, signal_name: String, wake_at: Option<DateTime<Utc>>, }, SignalConsumed,
}
Expand description

Unified error type for workflow operations.

Variants§

§

DuplicateTaskId(String)

A duplicate task ID was found during workflow building.

§

TaskNotFound(String)

A referenced task ID was not found in the registry.

§

TaskNotImplemented(String)

The task has no implementation (function body).

§

DefinitionMismatch

The workflow definition hash doesn’t match. This indicates the serialized state was created with a different workflow definition.

Fields

§expected: String

The expected hash (from current workflow).

§found: String

The hash found in the serialized state.

§

Cancelled

The workflow was cancelled.

Fields

§reason: Option<String>

Optional reason for the cancellation.

§cancelled_by: Option<String>

Optional identifier of who cancelled the workflow.

§

Paused

The workflow was paused.

Fields

§reason: Option<String>

Optional reason for the pause.

§paused_by: Option<String>

Optional identifier of who paused the workflow.

§

EmptyFork

A fork has no branches and no join task.

§

TaskPanicked(String)

A task panicked during execution.

§

ResumeError(String)

Cannot resume workflow from saved state.

§

Deserialization(String)

Deserialization of binary data failed.

§

BranchNotFound(String)

A named branch was not found in the outputs.

§

Waiting

The workflow is waiting for a delay to expire.

Fields

§wake_at: DateTime<Utc>

When the delay expires.

§

TaskTimedOut

Task exceeded its configured timeout duration.

This marks the entire workflow as Failed. The task future is actively dropped (cancelled mid-flight) via tokio::select! in all runners.

Fields

§task_id: String

The task that timed out.

§timeout: Duration

The configured timeout duration.

§

AwaitingSignal

The workflow is waiting for an external signal.

Fields

§signal_id: String

The signal node ID.

§signal_name: String

The named signal being waited on.

§wake_at: Option<DateTime<Utc>>

Optional timeout deadline.

§

SignalConsumed

A buffered signal was consumed during park — execution should continue.

This is an internal sentinel used by park_at_signal when a signal is already buffered. The executor should re-enter the loop.

Implementations§

Source§

impl WorkflowError

Source

pub fn cancelled() -> Self

Create a new Cancelled error with no reason or source.

Source

pub fn paused() -> Self

Create a new Paused error with no reason or source.

Trait Implementations§

Source§

impl Clone for WorkflowError

Source§

fn clone(&self) -> WorkflowError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorkflowError

Source§

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

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

impl Display for WorkflowError

Source§

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

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

impl Error for WorkflowError

1.30.0 · 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

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.