Skip to main content

Module error

Module error 

Source
Expand description

Error types and result aliases. Domain-specific error types for the Yeti platform.

Provides structured, type-safe errors with HTTP status code mapping, context extension, and convenience error types for handlers.

The top-level crate::error::YetiError composes domain-specific error enums from the domain submodule via #[from], and exposes HTTP status / metadata helpers for the response layer.

§Errors

ResultExt adapters (with_file_context, with_config_context, with_request_context, with_context, with_json_context) return the Err variant of the input Result rewrapped with additional context — they don’t introduce failure modes, only annotate them. The resulting YetiError variant matches the adapter name (Internal for file/request, Config for config, etc.).

Structs§

BadRequest
400 Bad Request error (static string).
BadRequestOwned
400 Bad Request error (owned string).
ErrorMetadata
Metadata for structured error responses.
Forbidden
403 Forbidden error.
NotFoundError
404 Not Found error.
ProblemDetails
RFC 9457 Problem Details response body.
Unauthorized
401 Unauthorized error.

Enums§

BackendError
Backend management errors.
CasReason
Reason a Table::put_if or put_confirmed call failed.
EncodingError
Encoding and decoding errors.
IndexError
Index-related errors.
QueryError
Query parsing and evaluation errors.
SchemaError
Schema validation and definition errors.
StorageError
Storage layer errors.
YetiError
Main error type for Yeti platform operations.

Traits§

ResultExt
Extension trait for adding context to Result types.

Type Aliases§

Result
Convenient type alias for Result with YetiError.