#[non_exhaustive]pub enum BackendErrorKind {
Transport,
Protocol,
Timeout,
Auth,
Cluster,
BusyLoading,
ScriptNotLoaded,
Other,
}Expand description
Classified backend transport errors, kept backend-agnostic on purpose (#88). Each variant maps a family of native backend error kinds into a stable, consumer-matchable shape.
Consumers requiring the exact native kind for a Valkey backend
must go through ff_backend_valkey explicitly; ff-sdk/ff-server’s
public surface will only ever hand out BackendErrorKind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport
Network / I/O failure: the request may or may not have been processed. Typically retryable with backoff.
Protocol
Backend rejected the request on protocol / parse grounds. Not retryable without a fix.
Timeout
Backend timed out responding to the request. Retryable.
Auth
Authentication / authorization failure. Not retryable.
Cluster
Cluster topology churn (MOVED, ASK, CLUSTERDOWN, MasterDown, CrossSlot, ConnectionNotFoundForRoute, AllConnectionsUnavailable). Retryable after topology settles.
BusyLoading
Backend is temporarily busy loading state (e.g. Valkey
LOADING). Retryable.
ScriptNotLoaded
Backend indicates the referenced script/function does not exist. Typically handled by the caller via re-load.
Other
Any other classified error from the backend. Fallback bucket for native kinds outside the curated set above.
Implementations§
Source§impl BackendErrorKind
impl BackendErrorKind
Sourcepub fn as_stable_str(&self) -> &'static str
pub fn as_stable_str(&self) -> &'static str
Stable, lowercase-kebab label suitable for log fields / HTTP
kind body slots. Guaranteed not to change across releases
for the existing variants.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether a caller should consider this kind retryable with backoff. Conservative — auth + protocol + other are terminal.
Trait Implementations§
Source§impl Clone for BackendErrorKind
impl Clone for BackendErrorKind
Source§fn clone(&self) -> BackendErrorKind
fn clone(&self) -> BackendErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more