pub enum EngineError {
Show 22 variants
Operation(OperationError),
Store(StoreError),
InvalidWorkflow(String),
StepConfig(String),
Decision(DecisionError),
NoDecisionProvider {
step: String,
},
Serialization(Error),
RunBudgetExceeded {
run_id: Uuid,
limit_usd: Decimal,
spent_usd: Decimal,
step_budget_usd: Decimal,
},
MonthlyBudgetExceeded {
limit_usd: Decimal,
spent_usd: Decimal,
},
MissingArtifact {
step: String,
pattern: String,
},
ArtifactNotDeclared {
step: String,
name: String,
},
ArtifactNotFound {
step: String,
name: String,
},
ArtifactsUnavailable(String),
Artifact(ArtifactError),
ApprovalRequired {
run_id: Uuid,
step_id: Uuid,
message: String,
},
ApprovalRejected {
run_id: Uuid,
step_id: Uuid,
reason: String,
},
HumanInputRequired {
run_id: Uuid,
step_id: Uuid,
message: String,
},
HumanInputRejected {
run_id: Uuid,
step_id: Uuid,
reason: String,
},
DelaySleeping {
run_id: Uuid,
step_id: Uuid,
wake_at: DateTime<Utc>,
},
WorkflowGuardRejected(WorkflowRejection),
ReplayDivergence {
position: u32,
expected: String,
recorded: String,
},
HandlerVersionMismatch {
run_id: Uuid,
workflow_name: String,
run_version: String,
current_version: String,
},
}Expand description
Errors produced by the workflow engine.
Variants§
Operation(OperationError)
An operation (Shell, Http, Agent) failed during step execution.
Store(StoreError)
The backing store returned an error.
InvalidWorkflow(String)
The workflow definition is invalid.
StepConfig(String)
A step configuration could not be deserialized for execution.
Decision(DecisionError)
A decision answer was accessed by name with the wrong type or a missing key.
NoDecisionProvider
A decision step was reached but no DecisionProvider
is wired into the engine.
Serialization(Error)
JSON serialization error.
RunBudgetExceeded
The run reached its cumulative cost cap before launching an agent step.
Raised before the step is created, so no work and no spend happen.
The engine transitions the run to
Cancelled.
Fields
MonthlyBudgetExceeded
The global monthly cost quota is exhausted; no new run may be created.
Runs already in flight are never interrupted by this error.
Fields
MissingArtifact
A step declared an output that produced no file.
Raised only when the step itself succeeded: a declared output that never materialised is a broken contract, and failing here beats failing later in whichever step tried to consume it.
Fields
ArtifactNotDeclared
A handle was asked for an artifact the step never declared.
Fields
ArtifactNotFound
A step asked for an artifact that no earlier step produced.
Fields
Artifacts were used but no storage backend is configured.
Artifact(ArtifactError)
The artifact storage backend failed.
ApprovalRequired
The run requires human approval before continuing.
Fields
ApprovalRejected
An approval gate was rejected instead of granted.
Raised when a StepInterceptor resolves
the gate with ApprovalOutcome::Rejected.
The engine fails the run; the rejection is deterministic, so the run is
never replayed.
Fields
HumanInputRequired
The run waits for a typed human input before continuing.
Raised by WorkflowContext::human_input
when no answer has been given yet. The engine transitions the run to
AwaitingApproval.
Fields
HumanInputRejected
A human input request was rejected instead of answered.
Returned to the handler by
WorkflowContext::human_input,
which decides what happens next. A propagated rejection fails the run,
and the run is never retried.
Fields
DelaySleeping
A delay step suspended the run until the given time.
The engine transitions the run to
Sleeping and sets
scheduled_at so the worker re-queues it automatically.
Fields
WorkflowGuardRejected(WorkflowRejection)
A workflow invocation was rejected by the workflow guard.
The run is transitioned to
Cancelled when this
error is raised.
ReplayDivergence
The step stored at position does not match the step the handler just
called: its name or its StepKind differ from what was recorded before
the run was suspended.
Raised instead of silently serving another step’s cached output when the handler’s code changed while the run was suspended (a deploy during a pending approval, human input, decision escalation or delay): step positions can shift, and without this check every step after the divergence point would silently receive another step’s output, vote or approval.
Fields
HandlerVersionMismatch
The run’s handler changed since the run was created or suspended, and the handler’s current version is not declared compatible with the version the run was created with.
Checked before any step is replayed, on the same rule the manual retry
endpoint applies (HANDLER_VERSION_MISMATCH). Unlike retry, resume has no
force override: replaying an incompatible handler’s steps risks serving
one step’s cached output to another (see
ReplayDivergence).
Trait Implementations§
Source§impl Debug for EngineError
impl Debug for EngineError
Source§impl Display for EngineError
impl Display for EngineError
Source§impl Error for EngineError
impl Error for EngineError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()