pub enum RustyError {
Graph(String),
Node(String),
Interrupt {
value: Value,
},
Checkpoint(String),
Llm(String),
Tool(String),
Replay(String),
Serialization(Error),
InvalidUpdate(String),
Cancelled(String),
}Expand description
The single error type for the whole crate.
Design note: Interrupt is modeled as an error because a node calls
interrupt() mid-execution to unwind out of the current super-step; the
executor catches this variant, persists a checkpoint, and surfaces the
payload to the caller. This mirrors LangGraph’s GraphInterrupt and keeps
the control flow explicit in the type system.
Variants§
Graph(String)
Structural graph problems: invalid builder usage, validation failures
from GraphBuilder::compile() (unknown entry point, dangling edges), routing
to unknown nodes at runtime, exceeded max_steps, etc.
Node(String)
A node failed during execution. The string should include the node name and the underlying failure description.
Interrupt
A node invoked interrupt(payload). Carries the payload to surface
to the caller; resumable via RunConfig::resume / Command::resume.
This variant is not a failure — it is the suspend signal of the interrupt/resume protocol.
Fields
Checkpoint(String)
Checkpoint persistence failures (IO, serialization, not found).
Llm(String)
LLM provider failures (HTTP errors, malformed responses, auth).
Tool(String)
Tool execution failures (unknown tool, bad arguments, runtime error).
Replay(String)
Exact-replay failures (Flight Recorder, R0.5): the run diverged from the journaled evidence (request-hash mismatch, effect-order violation, unserved recorded effects), a journal snapshot or fixture failed integrity verification, or a replay was requested against an incompatible graph, fixture, or resumed-run journal.
Serialization(Error)
JSON (de)serialization failures.
InvalidUpdate(String)
A channel received an update it cannot accept — most commonly a
LastValue-style channel written more than once in a single
super-step (the LangGraph InvalidUpdateError class of bug), or a
write to an undeclared channel.
Cancelled(String)
The run was cancelled cooperatively through
crate::executor::RunConfig::cancellation (R0.6 wave 2c, drain):
the executor stopped at a super-step boundary, so the boundary
checkpoint is intact and the run resumes from exactly there.
Like RustyError::Interrupt, this variant is not a failure —
it is control flow (the cancelled class of the Durable Work
taxonomy: never retried, never dead-lettered). Unlike an interrupt,
nothing is being asked of a human; whoever cancelled decides whether
and when to re-drive the run from its last checkpoint.
Implementations§
Source§impl RustyError
impl RustyError
Sourcepub fn is_interrupt(&self) -> bool
pub fn is_interrupt(&self) -> bool
Returns true if this error is an interrupt (suspend) signal rather
than an actual failure.
Sourcepub fn interrupt_value(&self) -> Option<&Value>
pub fn interrupt_value(&self) -> Option<&Value>
If this is an RustyError::Interrupt, returns a reference to
the interrupt payload.
Trait Implementations§
Source§impl Debug for RustyError
impl Debug for RustyError
Source§impl Display for RustyError
impl Display for RustyError
Source§impl Error for RustyError
impl Error for RustyError
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()