pub enum ExternalError {
NotRegistered(String),
SourceResolution(String),
Execution(String),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Failure modes for an external evaluator invocation.
Variants§
NotRegistered(String)
The policy’s external_evaluator.kind has no runner in the
registry. Dispatch treats this as a skip (policy not-matching);
surfaced as an error only when the registry is asked directly.
SourceResolution(String)
The runner could not resolve the EvaluatorSource into the
rule-engine-specific input (missing file, state-path lookup
failed, bad Inline body, …).
Execution(String)
The rule engine ran but returned an error (syntax error in the policy body, runtime trap, subprocess non-zero exit, …).
Other(Box<dyn Error + Send + Sync>)
Escape hatch for runner-specific errors.
Implementations§
Source§impl ExternalError
impl ExternalError
Sourcepub fn code(&self) -> &'static str
pub fn code(&self) -> &'static str
A stable, low-cardinality code for this error, which telemetry
records as error.type. A runner that timed out returns
TimedOut in ExternalError::Other, and its code is
evaluator_timeout.
Trait Implementations§
Source§impl Debug for ExternalError
impl Debug for ExternalError
Source§impl Display for ExternalError
impl Display for ExternalError
Source§impl Error for ExternalError
impl Error for ExternalError
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()