pub enum OutboxError {
InfrastructureError(String),
DuplicateEvent,
DatabaseError(String),
BrokerError(String),
ConfigError(String),
}Expand description
Error categories produced by the outbox crate.
The variants correspond to the layer that originated the failure. When a
caller needs to decide whether to retry, the variant is usually enough —
most transient conditions show up as InfrastructureError,
DatabaseError, or
BrokerError; configuration and deduplication issues
are terminal.
Variants§
InfrastructureError(String)
Failure from surrounding infrastructure that is not the primary database or broker (Redis, a notification channel, DNS, etc.). Usually transient.
DuplicateEvent
The event’s idempotency token has already been reserved by a prior
call. Returned by OutboxService::add_event
when IdempotencyStorageProvider::try_reserve
reports the token as taken. Not retryable.
DatabaseError(String)
Failure from the primary event store (for example SQL errors, pool exhaustion, serialization conflicts). Often retryable by the caller.
BrokerError(String)
Failure from the message transport (Kafka, Redis Streams, etc.) when publishing an event.
ConfigError(String)
Invalid or incomplete configuration discovered at wiring time —
typically raised by OutboxManagerBuilder::build
when a required collaborator is missing. Not retryable.
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
1.30.0 · 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()