#[non_exhaustive]pub enum EngineError {
Show 13 variants
Auth(AuthGate),
InvalidWorldName,
NotFound,
AppendOnly,
PayloadTooLarge {
max: usize,
},
PreconditionFailed {
message: &'static str,
},
QuotaExceeded {
used: usize,
quota: usize,
projected: usize,
},
TransientStorage {
sqlite_code: Option<i32>,
},
InsufficientStorage {
sqlite_code: Option<i32>,
},
Storage {
sqlite_code: Option<i32>,
},
SubscriptionLimit,
ShuttingDown,
InternalInvariant(&'static str),
}Expand description
Runtime operation errors reported by the Engine facade.
Distinct from EngineBuildError: these are per-operation failures
returned by Engine::read, Engine::replace, Engine::append,
Engine::delete, Engine::subscribe, and the introspection methods.
The enum is #[non_exhaustive]; match on the variants you care about and
route the rest through a default arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Auth(AuthGate)
Caller’s tier is too low for the requested gate.
InvalidWorldName
The supplied world name failed canonical-path validation.
NotFound
The world does not exist.
AppendOnly
The target world is append-only and refuses delete/overwrite (for
example var/log/deletes).
PayloadTooLarge
Request body exceeded the per-world byte limit.
PreconditionFailed
An If-Match / If-None-Match precondition rejected the write.
QuotaExceeded
Write would exceed the configured durable storage quota.
Fields
TransientStorage
Storage is temporarily unavailable (e.g. SQLite BUSY/LOCKED).
Callers should retry with backoff.
InsufficientStorage
Storage backing exhausted (full disk, IO failure that maps to “no space left”). Callers must surface this as 5xx-class to operators.
Storage
Generic storage failure that is neither transient nor insufficient.
SubscriptionLimit
Subscription slot semaphore is exhausted.
ShuttingDown
Engine::shutdown has been called; do not start new operations.
InternalInvariant(&'static str)
Internal invariant violation. Indicates a bug in the engine.
Implementations§
Source§impl EngineError
impl EngineError
Sourcepub fn sqlite_code(&self) -> Option<i32>
pub fn sqlite_code(&self) -> Option<i32>
Returns the underlying SQLite extended result code, when this error originated in the storage backend.
Non-storage variants (auth, not-found, append-only, precondition,
quota, subscription-limit, shutting-down, internal-invariant) always
return None. Adapters can use this for protocol-specific code
mapping without inspecting the variant.