pub enum FeedbackError {
MissingApiKey {
var: &'static str,
},
Client(String),
Completion(String),
Extraction(String),
}Expand description
Why feedback could not be produced.
A typed error implementing std::error::Error, so core stays free of
anyhow (ADR-0001); the CLI maps it at the edge.
Variants§
MissingApiKey
The active provider’s API key environment variable is unset or empty.
Client(String)
The provider client could not be constructed.
Completion(String)
The completion request itself failed — a transport, auth, or model error (e.g. the provider rejected the key, or the network was unreachable). The caller’s recourse is to retry or fix credentials, not to re-prompt.
Extraction(String)
The model responded, but its output could not be turned into a verdict — a malformed or missing field, or no tool call at all. The model’s output, not the transport, is at fault.
Trait Implementations§
Source§impl Debug for FeedbackError
impl Debug for FeedbackError
Source§impl Display for FeedbackError
impl Display for FeedbackError
Source§impl Error for FeedbackError
impl Error for FeedbackError
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
Source§impl From<ExtractionError> for FeedbackError
impl From<ExtractionError> for FeedbackError
Source§fn from(error: ExtractionError) -> Self
fn from(error: ExtractionError) -> Self
Preserve rig’s own distinction between a failed request and an
unparseable response (§1.2): a CompletionError is a transport/auth/model
failure, while a deserialize failure or missing tool call means the
response could not be turned into a verdict.
The match is deliberately exhaustive with no wildcard arm: if a future rig
version adds an ExtractionError variant, this fails to compile until we
decide which FeedbackError it maps to, rather than silently funnelling it
into the wrong kind.