pub enum ServerError {
Valkey(Error),
ValkeyContext {
source: Error,
context: String,
},
Config(ConfigError),
LibraryLoad(LoadError),
PartitionMismatch(String),
NotFound(String),
InvalidInput(String),
OperationFailed(String),
Script(String),
ConcurrencyLimitExceeded(&'static str, u32),
ValkeyVersionTooLow {
detected: String,
required: String,
},
}Expand description
Server error type.
Variants§
Valkey(Error)
Valkey connection or command error (preserves ErrorKind for caller inspection).
ValkeyContext
Valkey error with additional context (preserves ErrorKind via #[source]).
Config(ConfigError)
LibraryLoad(LoadError)
PartitionMismatch(String)
NotFound(String)
InvalidInput(String)
OperationFailed(String)
Script(String)
ConcurrencyLimitExceeded(&'static str, u32)
Server-wide concurrency limit reached on a labelled pool. Surfaces
as HTTP 429 at the REST boundary so load balancers and clients can
retry with backoff. The source label (“stream_ops”, “admin_rotate”,
etc.) identifies WHICH pool is exhausted so operators aren’t
misled by a single “tail unavailable” string when the real fault
is rotation contention.
Fields: (source_label, max_permits).
ValkeyVersionTooLow
Detected Valkey version is below the RFC-011 §13 minimum. The engine depends on Valkey Functions (stabilized in 7.2), RESP3 (7.2+), and hash-tag routing; older versions do not implement the required primitives. Operator action: upgrade Valkey.
Implementations§
Source§impl ServerError
impl ServerError
Sourcepub fn valkey_kind(&self) -> Option<ErrorKind>
pub fn valkey_kind(&self) -> Option<ErrorKind>
Returns the underlying ferriskey ErrorKind, if this error carries one.
Covers direct Valkey variants and library-load failures that bubble a
ferriskey::Error through LoadError::Valkey.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether this error is safely retryable by a caller. Semantics match
ScriptError::class() == Retryable for Lua errors plus a kind-aware
check for transport/library-load failures. Business-logic rejections
(NotFound, InvalidInput, OperationFailed, Script, Config, PartitionMismatch)
return false — those won’t change on retry.
Trait Implementations§
Source§impl Debug for ServerError
impl Debug for ServerError
Source§impl Display for ServerError
impl Display for ServerError
Source§impl Error for ServerError
impl Error for ServerError
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<ConfigError> for ServerError
impl From<ConfigError> for ServerError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Source§impl From<Error> for ServerError
impl From<Error> for ServerError
Auto Trait Implementations§
impl Freeze for ServerError
impl !RefUnwindSafe for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnsafeUnpin for ServerError
impl !UnwindSafe for ServerError
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 more