pub enum YetiError {
Show 14 variants
Storage(StorageError),
Query(QueryError),
Schema(SchemaError),
NotFound {
resource_type: String,
id: String,
},
Validation(String),
Encoding(EncodingError),
Backend(BackendError),
Index(IndexError),
Config(String),
Unauthorized(String),
Forbidden(String),
Internal(String),
RateLimited {
retry_after_secs: u64,
message: String,
},
Cas {
reason: CasReason,
},
}Expand description
Main error type for Yeti platform operations.
Variants§
Storage(StorageError)
Storage layer errors (RocksDB, I/O, corruption)
Query(QueryError)
Query parsing and evaluation errors
Schema(SchemaError)
Schema validation and definition errors
NotFound
Resource not found (404)
Fields
Validation(String)
Request validation errors (400)
Encoding(EncodingError)
Encoding/decoding errors
Backend(BackendError)
Backend management errors
Index(IndexError)
Index-related errors
Config(String)
Configuration errors
Unauthorized (401)
Forbidden(String)
Forbidden (403)
Internal(String)
Generic internal errors (500)
RateLimited
Rate-limit exhausted (429). Carries the retry hint so the
HTTP layer can emit Retry-After: <secs>.
Fields
Cas
Compare-and-swap failures from Table::put_if / put_confirmed.
Implementations§
Source§impl YetiError
impl YetiError
Sourcepub const fn metadata(&self) -> ErrorMetadata
pub const fn metadata(&self) -> ErrorMetadata
Get all error metadata in one match (single source of truth).
Sourcepub fn to_problem_details(&self) -> ProblemDetails
pub fn to_problem_details(&self) -> ProblemDetails
Build an RFC 9457 Problem Details response body from this error.
Sourcepub const fn status_code(&self) -> u16
pub const fn status_code(&self) -> u16
Get the HTTP status code for this error.
Sourcepub const fn error_type(&self) -> &'static str
pub const fn error_type(&self) -> &'static str
Get error type string for metrics.
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Get a structured error code for API responses.
Sourcepub const fn is_retryable(&self) -> bool
pub const fn is_retryable(&self) -> bool
Check if error is retryable.
Trait Implementations§
Source§impl Error for YetiError
impl Error for YetiError
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()
Source§impl From<BackendError> for YetiError
impl From<BackendError> for YetiError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<BadRequest> for YetiError
impl From<BadRequest> for YetiError
Source§fn from(err: BadRequest) -> Self
fn from(err: BadRequest) -> Self
Source§impl From<BadRequestOwned> for YetiError
impl From<BadRequestOwned> for YetiError
Source§fn from(err: BadRequestOwned) -> Self
fn from(err: BadRequestOwned) -> Self
Source§impl From<EncodingError> for YetiError
impl From<EncodingError> for YetiError
Source§fn from(source: EncodingError) -> Self
fn from(source: EncodingError) -> Self
Source§impl From<IndexError> for YetiError
impl From<IndexError> for YetiError
Source§fn from(source: IndexError) -> Self
fn from(source: IndexError) -> Self
Source§impl From<NotFoundError> for YetiError
impl From<NotFoundError> for YetiError
Source§fn from(err: NotFoundError) -> Self
fn from(err: NotFoundError) -> Self
Source§impl From<ParseFloatError> for YetiError
impl From<ParseFloatError> for YetiError
Source§fn from(err: ParseFloatError) -> Self
fn from(err: ParseFloatError) -> Self
Source§impl From<ParseIntError> for YetiError
impl From<ParseIntError> for YetiError
Source§fn from(err: ParseIntError) -> Self
fn from(err: ParseIntError) -> Self
Source§impl From<PatternError> for YetiError
impl From<PatternError> for YetiError
Source§fn from(err: PatternError) -> Self
fn from(err: PatternError) -> Self
Source§impl From<QueryError> for YetiError
impl From<QueryError> for YetiError
Source§fn from(source: QueryError) -> Self
fn from(source: QueryError) -> Self
Source§impl From<SchemaError> for YetiError
impl From<SchemaError> for YetiError
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
Source§impl From<StorageError> for YetiError
impl From<StorageError> for YetiError
Source§fn from(source: StorageError) -> Self
fn from(source: StorageError) -> Self
Source§fn from(err: Unauthorized) -> Self
fn from(err: Unauthorized) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for YetiError
impl !UnwindSafe for YetiError
impl Freeze for YetiError
impl Send for YetiError
impl Sync for YetiError
impl Unpin for YetiError
impl UnsafeUnpin for YetiError
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> ToEcoString for T
impl<T> ToEcoString for T
Source§fn to_eco_string(&self) -> EcoString
fn to_eco_string(&self) -> EcoString
EcoString.