pub enum KernelError {
AgentNotFound {
id: AgentId,
},
PermissionDenied {
reason: String,
},
ProgramNotFound {
name: String,
},
ProgramAlreadyExists {
name: String,
},
InvalidConfig {
detail: String,
},
SeedNotFound {
id: String,
},
SessionNotFound {
id: String,
},
StateStore(Error),
Internal(Error),
Memory {
reason: String,
},
Timeout {
context: String,
},
RateLimited {
context: String,
},
}Expand description
Oxios kernel error type.
Variants§
AgentNotFound
Requested agent was not found.
PermissionDenied
Permission denied for the requested operation.
ProgramNotFound
Requested program was not found.
ProgramAlreadyExists
A program with this name is already installed.
InvalidConfig
Invalid configuration value.
SeedNotFound
Requested seed was not found.
SessionNotFound
Requested session was not found.
StateStore(Error)
I/O error from the state store.
Internal(Error)
An internal error wrapped from anyhow.
Memory
Memory subsystem error (HNSW index, embedding, etc.).
Timeout
Operation timed out.
RateLimited
Rate limit exceeded.
Implementations§
Source§impl KernelError
impl KernelError
Sourcepub fn http_status(&self) -> HttpStatus
pub fn http_status(&self) -> HttpStatus
Map this error to an HTTP-compatible status code.
Returns a framework-agnostic HttpStatus that consumers can convert
to their web framework’s status type.
Source§impl KernelError
impl KernelError
Sourcepub fn category(&self) -> ErrorCategory
pub fn category(&self) -> ErrorCategory
Classify this error into a category.
Useful for error monitoring, alerting, and retry decisions.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether this error is retryable.
Timeout and rate limit errors are retryable after backoff. Infrastructure errors may be retryable.
Trait Implementations§
Source§impl Debug for KernelError
impl Debug for KernelError
Source§impl Display for KernelError
impl Display for KernelError
Source§impl Error for KernelError
impl Error for KernelError
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()