pub enum RunError {
Show 13 variants
EmptyPrompt,
BudgetExhausted {
limit: u64,
spent: u64,
},
NoSuchSession,
Context(ContextError),
Provider(ProviderError),
Runtime(RuntimeError),
OutputMismatch(Error),
Sink(Error),
Forwarder(JoinError),
Skills(SkillLoadError),
Mcp(McpError),
Templates(TemplateError),
Hooks(HookConfigError),
}Expand description
Anything that can go wrong opening a workspace, preparing a run, or driving one.
One error type across all three, rather than a WorkspaceError beside it:
opening a workspace exists to prepare runs, and every failure listed here is
a failure a caller of run has always been able to receive.
Variants§
EmptyPrompt
BudgetExhausted
The shared allowance this turn draws on has nothing left.
A decision rather than a failure of the work, which is why it is its own
variant: a caller fanning out over a BudgetPool
stops minting on this, where it would retry on a provider error. Raised
before the prompt is sent and before the stream opens, so the
conversation is left exactly as it was.
NoSuchSession
Context(ContextError)
Provider(ProviderError)
Runtime(RuntimeError)
OutputMismatch(Error)
A typed turn answered, but not in the shape that was asked for.
Separate from Runtime because the two call for
different reactions and basis can tell them apart honestly: this one is
basis’s own verdict. The typed path asks mentra for the raw payload and
deserializes it here, so a value that does not fit T is a schema or
prompt problem — retry with a clearer schema — while a provider failure
is not. The exchange stays in the session’s transcript either way; see
PreparedRun::output.
Sink(Error)
Forwarder(JoinError)
Skills(SkillLoadError)
Mcp(McpError)
Templates(TemplateError)
Hooks(HookConfigError)
Trait Implementations§
Source§impl Error for RunError
impl Error for RunError
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()