Enum Error
pub enum Error {
Show 16 variants
Busy,
NotFound(String),
AlreadyExists(String),
UnknownWorkflow(String),
Step {
name: String,
failure: Failure,
},
Failed(Failure),
Child {
id: String,
failure: Failure,
},
Cancelled(String),
TimedOut,
Terminated,
Determinism(String),
Rejected(String),
Codec(String),
Connection(String),
Io(String),
Closed,
}Expand description
Everything that can go wrong in Fusee, as seen by application code.
Every SDK has the same set, named by Error::code; each code has a
page at Error::docs.
Variants§
Busy
The shard’s queues are full. Retry later; nothing was recorded.
NotFound(String)
No run with this workflow ID is known (never started, or its retention ended).
AlreadyExists(String)
A workflow with this ID already exists and the start asked for a new run only. Carries the ID and what holds it.
UnknownWorkflow(String)
No code is registered for this workflow type (or version). Carries the message, which lists the types that are registered.
Step
A step failed after its last attempt, or with a failure that is not retried. Carries the step name and the step’s failure.
Failed(Failure)
The workflow (or an update, or an object’s handler) failed.
Child
A child workflow failed. Carries its workflow ID and its failure.
Cancelled(String)
Cancellation reached this operation. Carries the reason.
TimedOut
A timeout elapsed (step, wait, or the workflow’s deadline).
Terminated
The run was terminated.
Determinism(String)
The code made different journal operations than its journal records.
Rejected(String)
A request was refused and nothing was recorded: an update’s validator refused it, a completion token is stale, an argument is invalid. Carries the reason.
Codec(String)
A value could not be serialized or deserialized.
Connection(String)
No connection to a Fusee server, or it was lost.
Io(String)
A disk or network failure. After a failed flush the shard stops.
Closed
The engine is closed.
Implementations§
§impl Error
impl Error
pub fn failed(message: impl Into<String>) -> Self
pub fn failed(message: impl Into<String>) -> Self
An error with a failure to wrap: a workflow’s failure from a message.
pub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether a step that returned this error may be retried.
pub fn to_failure(&self) -> Failure
pub fn to_failure(&self) -> Failure
The error as a recorded failure. Fusee’s own errors record their code as the type, so every SDK reads them back as the same error.
pub fn from_failure(f: Failure) -> Self
pub fn from_failure(f: Failure) -> Self
Reads a recorded failure back: one of Fusee’s own errors when its type is one of their codes, otherwise a workflow failure.