#[non_exhaustive]pub enum GraphError {
Show 17 variants
ValidationError(String),
ExecutionError(String),
RoutingError(String),
RecursionLimitReached(usize),
NodeError(String),
CheckpointError(String),
CheckpointVersionConflict {
checkpoint_id: String,
expected: u64,
actual: u64,
},
StateError(String),
ExecutionInterrupted(String),
ResumeError(String),
InfiniteCycleError(String),
OrphanNodeError(String),
DuplicateEdgeError(String),
MissingRouteTargetError(String),
RuntimeError(String),
InterruptRequest {
payload: Value,
},
DynamicInterrupt {
node: String,
payload: Value,
},
}Expand description
Errors that can occur during graph construction and execution.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ValidationError(String)
A graph validation check failed.
ExecutionError(String)
An error occurred while executing the graph.
RoutingError(String)
An error occurred while routing between nodes.
RecursionLimitReached(usize)
The recursion limit was reached during execution.
NodeError(String)
A node reported an error.
CheckpointError(String)
A checkpoint operation failed.
CheckpointVersionConflict
Optimistic-concurrency conflict while editing a checkpoint
(Checkpointer::update_state): the stored version no longer matches
the version the caller expected.
Fields
StateError(String)
A state update or merge failed.
ExecutionInterrupted(String)
Execution was interrupted at the named node.
ResumeError(String)
Resuming execution failed.
InfiniteCycleError(String)
The graph contains a cycle with no path to END.
OrphanNodeError(String)
A node is unreachable from the entry point.
DuplicateEdgeError(String)
Two edges duplicate the same source-target pair.
MissingRouteTargetError(String)
A routing function returned a key with no matching target.
RuntimeError(String)
An unexpected runtime error occurred.
InterruptRequest
A node requested a runtime (human-in-the-loop) interrupt. This is a
control-flow signal produced by a node so it can suspend mid-execution.
The compiled graph converts it into a GraphError::DynamicInterrupt
(after persisting a checkpoint) before it reaches the graph caller.
DynamicInterrupt
Execution was suspended by a node’s runtime interrupt. The checkpointer
(when attached) has already persisted the run’s state, so a process
restart can resume. Feed a human’s decision back in with
crate::compiled::graph::CompiledGraph::resume_with_value.
Trait Implementations§
Source§impl Debug for GraphError
impl Debug for GraphError
Source§impl Display for GraphError
impl Display for GraphError
Source§impl Error for GraphError
impl Error for GraphError
1.30.0 · 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()