pub enum ZoeyError {
Show 26 variants
DatabaseSqlx(Error),
Database(String),
Plugin(String),
Runtime(String),
Model(String),
Memory(String),
Serialization(Error),
Io(Error),
Config(String),
Validation(String),
Network(Error),
Template(String),
Service(String),
Event(String),
Action(String),
Provider(String),
Evaluator(String),
NotFound(String),
Auth(String),
RateLimit(String),
Timeout(String),
Other(String),
DatabaseConstraintViolation {
table: String,
constraint: String,
value: String,
suggestion: String,
},
VectorSearch {
message: String,
dimension: usize,
expected_dimension: usize,
},
MissingField {
field: String,
context: String,
suggestion: String,
},
ResourceExhausted {
resource: String,
message: String,
current: usize,
limit: usize,
},
}Expand description
Main error type for ZoeyOS operations
Variants§
DatabaseSqlx(Error)
Database operation error (from sqlx)
Database(String)
Database operation error (custom message)
Plugin(String)
Plugin-related error
Runtime(String)
Runtime error
Model(String)
Model/LLM error
Memory(String)
Memory operation error
Serialization(Error)
Serialization/deserialization error
Io(Error)
IO error
Config(String)
Configuration error
Validation(String)
Validation error
Network(Error)
Network/HTTP error
Template(String)
Template rendering error
Service(String)
Service error
Event(String)
Event handling error
Action(String)
Action execution error
Provider(String)
Provider error
Evaluator(String)
Evaluator error
NotFound(String)
Not found error (generic)
Auth(String)
Authentication/authorization error
RateLimit(String)
Rate limit error
Timeout(String)
Timeout error
Other(String)
Generic error with context
DatabaseConstraintViolation
Database constraint violation with details
Fields
VectorSearch
Vector search error
Fields
MissingField
Missing required field
Fields
ResourceExhausted
Resource exhausted
Implementations§
Source§impl ZoeyError
impl ZoeyError
Sourcepub fn validation(msg: impl Into<String>) -> Self
pub fn validation(msg: impl Into<String>) -> Self
Create a validation error
Sourcepub fn rate_limit(msg: impl Into<String>) -> Self
pub fn rate_limit(msg: impl Into<String>) -> Self
Create a rate limit error
Sourcepub fn constraint_violation(
table: impl Into<String>,
constraint: impl Into<String>,
value: impl Into<String>,
suggestion: impl Into<String>,
) -> Self
pub fn constraint_violation( table: impl Into<String>, constraint: impl Into<String>, value: impl Into<String>, suggestion: impl Into<String>, ) -> Self
Create a constraint violation error
Sourcepub fn vector_search(
message: impl Into<String>,
dimension: usize,
expected_dimension: usize,
) -> Self
pub fn vector_search( message: impl Into<String>, dimension: usize, expected_dimension: usize, ) -> Self
Create a vector search error
Trait Implementations§
Source§impl Error for ZoeyError
impl Error for ZoeyError
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
Auto Trait Implementations§
impl Freeze for ZoeyError
impl !RefUnwindSafe for ZoeyError
impl Send for ZoeyError
impl Sync for ZoeyError
impl Unpin for ZoeyError
impl !UnwindSafe for ZoeyError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.