pub enum LlmError {
Transport {
status: Option<u16>,
message: String,
},
Unparseable(String),
ModelStopped {
finish: String,
message: String,
},
NotConfigured(String),
Backend {
kind: BackendErrorKind,
message: String,
},
}Expand description
What can go wrong at the LLM boundary.
Every variant means “the file went unanalyzed”, but the variants preserve the cause so retry, failover, demotion, and reporting policy never has to infer semantics from a human-readable message.
Clone because the provider chain records the reason a provider went down
and hands a copy to every later file that skips it.
Variants§
Transport
Transport failure after the backend exhausted its retries.
status is the HTTP code when one exists; process failures use None.
Unparseable(String)
A response arrived but no JSON could be extracted.
ModelStopped
The model stopped before producing JSON, and the server said why.
It is about the request rather than the provider, so it neither fails over nor demotes the provider.
NotConfigured(String)
Configuration is incomplete.
Backend
A non-HTTP backend classified a failure from structured process state.
Implementations§
Trait Implementations§
Source§impl Error for LlmError
impl Error for LlmError
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()