pub enum ServerError {
Show 13 variants
Config {
message: String,
},
UnsafeDataRootAncestor {
data_root: PathBuf,
component: PathBuf,
reason: String,
},
TransportBind {
transport: &'static str,
address: SocketAddr,
message: String,
},
Transport {
transport: &'static str,
message: String,
},
SignalListener {
listener: &'static str,
message: String,
},
Namespace {
message: String,
},
EngineCall {
source: EngineError,
},
StoreBackend {
source: StoreError,
},
Stream {
failure: StreamFailure,
},
WorkerDispatch {
namespace: String,
activity_type: String,
reason: String,
},
WorkerConnectionLost {
channel: String,
detail: String,
},
LockPoisoned {
resource: &'static str,
},
Wire {
wire: WireError,
},
}Expand description
Server-library error taxonomy.
Variants§
Config
Operator configuration could not be loaded or validated.
UnsafeDataRootAncestor
A path-ambient store backend was configured beneath a renameable directory.
Fields
TransportBind
A transport listener could not bind or start.
Fields
address: SocketAddrConfigured listener address.
Transport
A running transport task aborted: it panicked or was cancelled.
Fields
SignalListener
A termination-signal listener could not be installed or failed.
Fields
Namespace
Namespace validation or authorization failed.
EngineCall
Engine call failed.
Fields
source: EngineErrorTyped engine error returned by the embedded engine.
StoreBackend
Store backend call failed before an engine handle was available.
Fields
source: StoreErrorTyped store error returned by the configured backend.
Stream
Streaming failure.
Fields
failure: StreamFailureStream failure class.
WorkerDispatch
A scheduled activity could not be pushed to a worker.
Fields
WorkerConnectionLost
The worker connection chosen for a dispatch was lost mid-flight: the connection was already gone at push time, or it closed before the worker sent its correlated push reply.
This is DISTINCT from Self::WorkerDispatch: a WorkerDispatch covers a
genuine reply timeout (the worker is alive but slow), a no-worker-available
selection failure, or any other dispatch fault, all of which keep the
outbox’s normal exponential backoff. A WorkerConnectionLost instead means
the chosen worker is gone (and has already been deregistered by liminal’s
on_worker_unregistered), so the row can be re-armed for IMMEDIATE re-claim
to fail over to a live worker without waiting out the backoff. The outbox
dispatcher keys its fast-failover decision on this variant.
Fields
LockPoisoned
A lock was poisoned and the protected state cannot be trusted.
Wire
A failure already translated into the public wire taxonomy.
Implementations§
Source§impl ServerError
impl ServerError
Sourcepub fn to_wire_error(&self) -> WireError
pub fn to_wire_error(&self) -> WireError
Convert a server error that crosses a transport boundary into the stable public wire taxonomy.
Sourcepub const fn is_config(&self) -> bool
pub const fn is_config(&self) -> bool
Return true when this is an operator configuration failure.
Sourcepub fn namespace_denied(message: impl Into<String>) -> Self
pub fn namespace_denied(message: impl Into<String>) -> Self
Construct a namespace-denied error without embedding authorization logic.
Sourcepub fn placement_admission_denied(
namespace: &str,
worker_node: Option<&str>,
required: &BTreeSet<String>,
) -> Self
pub fn placement_admission_denied( namespace: &str, worker_node: Option<&str>, required: &BTreeSet<String>, ) -> Self
Construct the loud, whole-registration rejection when a worker’s advertised
node violates a Pinned{L} namespace’s placement (Control-Plane Phase 2,
P2-I1). Names the offending namespace, the worker’s advertised node (or
“none”), and the required label set, so the operator sees exactly why the
registration was refused. Carried on the namespace-denied wire code — a
registration refused on isolation grounds is a namespace-authorization
failure, not a transient dispatch error.
Sourcepub fn deploy_denied(message: impl Into<String>) -> Self
pub fn deploy_denied(message: impl Into<String>) -> Self
Construct a deploy-authorization denial carried on the dedicated
deploy_denied wire code (deploy is not a namespace operation).
Sourcepub const fn lagged_stream() -> Self
pub const fn lagged_stream() -> Self
Construct a lagged-stream error.
Sourcepub fn worker_dispatch(
namespace: impl Into<String>,
activity_type: impl Into<String>,
reason: impl Into<String>,
) -> Self
pub fn worker_dispatch( namespace: impl Into<String>, activity_type: impl Into<String>, reason: impl Into<String>, ) -> Self
Construct a worker-dispatch error.
Sourcepub fn worker_connection_lost(
channel: impl Into<String>,
detail: impl Into<String>,
) -> Self
pub fn worker_connection_lost( channel: impl Into<String>, detail: impl Into<String>, ) -> Self
Construct a worker-connection-lost error for a dispatch whose chosen worker connection was gone at push time or closed before replying.
Sourcepub const fn is_worker_connection_lost(&self) -> bool
pub const fn is_worker_connection_lost(&self) -> bool
Return true when this is a lost-worker-connection dispatch failure.
The outbox dispatcher keys its fast cross-node failover on this: a lost connection means the worker is gone (already deregistered), so the row is re-armed for immediate re-claim instead of waiting out the retry backoff.
Sourcepub const fn lock_poisoned(resource: &'static str) -> Self
pub const fn lock_poisoned(resource: &'static str) -> Self
Construct a lock-poison error at the lock boundary.
Source§impl ServerError
impl ServerError
Sourcepub fn trace_fields(&self) -> ErrorTraceFields<'_>
pub fn trace_fields(&self) -> ErrorTraceFields<'_>
Return stable typed fields for structured error logging.
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<EngineError> for ServerError
impl From<EngineError> for ServerError
Source§fn from(source: EngineError) -> Self
fn from(source: EngineError) -> Self
Source§impl From<StoreError> for ServerError
impl From<StoreError> for ServerError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ServerError
impl !UnwindSafe for ServerError
impl Freeze for ServerError
impl Send for ServerError
impl Sync for ServerError
impl Unpin for ServerError
impl UnsafeUnpin 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request