#[non_exhaustive]pub enum ExecError {
Unavailable(String),
Denied(String),
Failed(String),
}Expand description
Why an execution-layer call did not do what was asked.
Three variants because a tool has three different things to say about them, and collapsing any two would make one of those sentences unavailable. “The execution environment is unreachable” is the host’s problem; “the policy refused” is something the model should work around; “the file does not exist” is the model’s to interpret.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
The provider itself is not usable — a remote that cannot be reached, a backend that was never mounted.
A provider that reports this must never have fallen back to executing locally instead. A deployment configured to run elsewhere, quietly running here when the elsewhere is down, has an isolation promise that fails exactly when it is needed.
Denied(String)
A policy refused: the sandbox, the network egress rules, a path outside what may be written.
Failed(String)
The target’s own failure — no such file, a non-zero exit, an HTTP 500.
Implementations§
Trait Implementations§
Source§impl Error for ExecError
impl Error for ExecError
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()
Source§impl From<ExecError> for EngineExecError
impl From<ExecError> for EngineExecError
Source§impl From<ExecError> for ToolError
The three sentences of ExecError, said in the vocabulary a tool result
speaks.
impl From<ExecError> for ToolError
The three sentences of ExecError, said in the vocabulary a tool result
speaks.
Collapsing them would cost the host the one case it can act on: a
Denied is the model’s to work around, a Failed is the target’s own
words, and an Unavailable is neither — it keeps its own prefix so that a
deployment whose execution environment is down reads as a broken
environment rather than as a tool the model used wrongly.