Skip to main content

RunError

Enum RunError 

Source
pub enum RunError {
Show 22 variants MissingInput { name: String, ty: String, }, InvalidInput { name: String, reason: String, }, UnknownInput { name: String, expected: Vec<String>, }, CapabilityDenied { node: String, effect: String, explicit: bool, }, ApprovalDenied { node: String, reason: String, }, VerificationFailed { node: String, verifier: String, }, BudgetExceeded { budget: String, limit: String, node: String, }, Provider { node: String, source: ProviderError, }, Tool { node: String, source: ToolError, }, SubAgent { node: String, agent: String, source: Box<RunError>, }, AgentNotAvailable { node: String, agent: String, }, UnsupportedResponseType { node: String, ty: String, reason: &'static str, }, StateNotSet { node: String, field: String, }, TypeMismatch { node: String, what: String, reason: String, }, OutputNotProduced { name: String, }, InvalidMemory { field: String, reason: String, }, Snapshot(SnapshotError), InputsAfterResume, NotResumable { label: String, nested: bool, available: Vec<String>, }, UnknownMemoryField { field: String, expected: Vec<String>, }, UnsupportedIrVersion { found: String, supported: String, }, MalformedIr(String),
}
Expand description

Why a run stopped.

Every variant names the node it happened at, because “the agent failed” is not actionable and “node n7 needed network, which the policy denies” is.

Variants§

§

MissingInput

A declared input was not supplied.

Fields

§name: String
§

InvalidInput

An input was supplied with the wrong type.

Fields

§name: String
§reason: String
§

UnknownInput

An input was supplied that the agent does not declare.

Fields

§name: String
§expected: Vec<String>
§

CapabilityDenied

A call needed an effect the artifact’s policy does not permit.

Fields

§node: String
§effect: String
§explicit: bool
§

ApprovalDenied

An approval gate was refused.

Fields

§node: String
§reason: String
§

VerificationFailed

A verify ran its check and the property did not hold.

The verified event carrying failed is emitted before this is returned, so the record says what the check found and then says the run ended. Artifacts emitted earlier in the flow stay in the record: they happened.

Fields

§node: String
§verifier: String
§

BudgetExceeded

A budget ran out.

Fields

§budget: String
§limit: String
§node: String
§

Provider

The model provider failed.

Fields

§node: String
§

Tool

A tool failed or was unavailable.

Fields

§node: String
§source: ToolError
§

SubAgent

A sub-agent run failed.

Fields

§node: String
§agent: String
§source: Box<RunError>
§

AgentNotAvailable

A sub-agent was called but its artifact was not supplied.

Fields

§node: String
§agent: String
§

UnsupportedResponseType

A response type cannot be requested from a model.

Fields

§node: String
§reason: &'static str
§

StateNotSet

Working memory was read before it was written.

Fields

§node: String
§field: String
§

TypeMismatch

A value did not match its declared type.

Fields

§node: String
§what: String
§reason: String
§

OutputNotProduced

The flow finished without producing a declared output.

Fields

§name: String
§

InvalidMemory

A stored persistent value did not match its declared type.

Fields

§field: String
§reason: String
§

Snapshot(SnapshotError)

A snapshot could not be used to continue this artifact.

§

InputsAfterResume

Inputs were supplied alongside a resumption that already carries them.

§

NotResumable

stop_at named a checkpoint the run could not stop at.

Fields

§label: String
§nested: bool

True when the label exists but sits inside a branch arm or a loop.

§available: Vec<String>
§

UnknownMemoryField

The store carries a field this artifact does not declare.

Fields

§field: String
§expected: Vec<String>
§

UnsupportedIrVersion

The artifact’s IR major version is not implemented.

Fields

§found: String
§supported: String
§

MalformedIr(String)

The artifact is internally inconsistent.

Implementations§

Source§

impl RunError

Source

pub fn is_operator_error(&self) -> bool

Whether the failure is the operator’s to fix (inputs, approvals, missing tools) rather than a defect in the artifact.

Trait Implementations§

Source§

impl Debug for RunError

Source§

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

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

impl Display for RunError

Source§

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

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

impl Error for RunError

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> 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> 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.