pub enum CognisError {
Show 13 variants
Provider {
provider: String,
message: String,
},
RateLimited {
retry_after_ms: u64,
},
AuthenticationFailed(String),
Tool {
name: String,
reason: String,
},
ToolValidationError(String),
Configuration(String),
Network {
status_code: Option<u16>,
message: String,
},
Timeout {
operation: String,
timeout_ms: u64,
},
Cancelled,
RecursionLimit {
limit: u32,
},
GraphInterrupted {
run_id: Uuid,
step: u64,
node: String,
kind: InterruptKind,
},
Serialization(String),
Internal(String),
}Expand description
All errors produced by cognis-core and downstream v2 crates.
Variants§
Provider
Provider call failed (network, HTTP, parse, etc.).
Fields
RateLimited
LLM provider rate-limited the request.
AuthenticationFailed(String)
Authentication failed (bad API key, expired token, etc.).
Tool
Tool dispatch or execution failed.
ToolValidationError(String)
Tool argument failed validation.
Configuration(String)
Configuration is invalid or incomplete.
Network
Network / transport error.
Fields
Timeout
Operation timed out.
Cancelled
Operation was cancelled via RunnableConfig::cancel_token.
RecursionLimit
Graph engine ran past its recursion_limit.
GraphInterrupted
Graph paused at a configured interrupt boundary. State is in the
configured checkpointer; resume via CompiledGraph::resume.
Fields
kind: InterruptKindWhether the interrupt fired before or after the node’s execute.
Serialization(String)
Serialization or deserialization failed.
Internal(String)
Catch-all for unexpected errors.
Implementations§
Source§impl CognisError
impl CognisError
Sourcepub fn category(&self) -> &'static str
pub fn category(&self) -> &'static str
Stable category string for telemetry / metrics filtering.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether retrying this error MAY succeed.
Sourcepub fn retry_delay(&self) -> Option<Duration>
pub fn retry_delay(&self) -> Option<Duration>
Suggested retry delay, if the error type carries one.
Trait Implementations§
Source§impl Debug for CognisError
impl Debug for CognisError
Source§impl Display for CognisError
impl Display for CognisError
Source§impl Error for CognisError
impl Error for CognisError
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()