#[non_exhaustive]pub enum OutboxError {
Serialization(Error),
Database(Box<dyn Error + Send + Sync>),
MissingHandler {
event_type: String,
},
MaxRetries {
event_id: Uuid,
attempts: u32,
},
TypeMismatch {
expected: &'static str,
actual: String,
},
Internal(String),
}Expand description
Errors raised by the outbox primitives, publishers and workers.
Marked #[non_exhaustive] so new variants can be added without a
breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Serialization(Error)
The event payload could not be serialized or deserialized as JSON.
Database(Box<dyn Error + Send + Sync>)
The backend reported a database-level failure.
The original error is preserved as a boxed source so callers can downcast if they need typed access to the underlying driver error.
MissingHandler
The worker polled an envelope whose event_type has no registered handler.
MaxRetries
The envelope was retried more times than the configured maximum.
Fields
TypeMismatch
An envelope was decoded into the wrong event type.
Returned when a caller invokes crate::OutboxEnvelope::decode
with a type whose crate::Event::EVENT_TYPE does not match the
envelope’s event_type field. Typically the sign of a
router or registry misconfiguration on the caller side.
Fields
Internal(String)
An invariant of the outbox machinery was violated.
Signals a bug in the framework itself, not a recoverable error. Report occurrences upstream.
Trait Implementations§
Source§impl Debug for OutboxError
impl Debug for OutboxError
Source§impl Display for OutboxError
impl Display for OutboxError
Source§impl Error for OutboxError
impl Error for OutboxError
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()