pub enum ErrorCode {
Show 35 variants
ClusterDown,
TryAgain,
Timeout,
Syntax,
InvalidArg,
NotFound,
MaxForwards,
CircuitOpen,
ConfirmFailed,
ReplConfirmFailed,
ClockErr,
ReadErr,
WriteErr,
RemoteErr,
NoiseErr,
TransportErr,
SwarmErr,
ActorDown,
ActorStopped,
MailboxFull,
AllReplicasFailed,
BufferEvicted,
BufferFull,
DbOpFailed,
InsufficientReplicas,
InvalidSender,
StaleWrite,
MissingPartSeq,
PartNotOwned,
QuorumFailed,
RemoteOpFailed,
SeqConflict,
WrongSeq,
WrongVer,
Redirect,
}Expand description
Error codes used in Sierra server responses.
These codes follow Redis conventions where applicable, with Sierra-specific extensions for domain-specific error conditions.
Variants§
ClusterDown
Cluster is down or partitions unavailable
TryAgain
Temporary failure, client should retry
Timeout
Request timed out
Syntax
Invalid syntax in command arguments
InvalidArg
Invalid argument provided
NotFound
Resource not found
MaxForwards
Too many request forwards (loop prevention)
CircuitOpen
Circuit breaker is open
ConfirmFailed
Confirmation operation failed
ReplConfirmFailed
Replication confirmation failed
ClockErr
System clock error
ReadErr
Read operation error
WriteErr
Write operation error
RemoteErr
Remote communication error
NoiseErr
Network noise protocol error
TransportErr
Transport layer error
SwarmErr
Swarm initialization error
ActorDown
Actor not running
ActorStopped
Actor stopped or died
MailboxFull
Actor mailbox is full
AllReplicasFailed
All replicas failed
BufferEvicted
Buffer was evicted
BufferFull
Buffer is full
DbOpFailed
Database operation failed
InsufficientReplicas
Insufficient healthy replicas
InvalidSender
Invalid sender
StaleWrite
Stale write detected
MissingPartSeq
Missing expected partition sequence
PartNotOwned
Partition not owned by this node
QuorumFailed
Replication quorum failed
RemoteOpFailed
Remote operation failed
SeqConflict
Sequence conflict detected
WrongSeq
Wrong expected sequence
WrongVer
Wrong expected version
Redirect
Redirect request to another node
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub fn with_message(&self, message: impl Display) -> String
pub fn with_message(&self, message: impl Display) -> String
Format this error code with a message.
§Example
use sierradb_protocol::ErrorCode;
let error = ErrorCode::InvalidArg.with_message("invalid timestamp format");
assert_eq!(error, "INVALIDARG invalid timestamp format");Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error code indicates a temporary failure that should be retried.
Sourcepub fn is_cluster_issue(&self) -> bool
pub fn is_cluster_issue(&self) -> bool
Check if this error code indicates a cluster availability issue.
Sourcepub fn is_client_error(&self) -> bool
pub fn is_client_error(&self) -> bool
Check if this error code indicates a client argument error.