appletheia_application/outbox/
outbox_relay_error.rs1use thiserror::Error;
2
3use crate::messaging::PublisherError;
4use crate::outbox::{OutboxError, OutboxFetcherError, OutboxState, OutboxWriterError};
5use crate::unit_of_work::UnitOfWorkError;
6use crate::unit_of_work::UnitOfWorkFactoryError;
7
8#[derive(Debug, Error)]
9pub enum OutboxRelayError {
10 #[error("outbox fetching failed: {0}")]
11 Fetcher(#[from] OutboxFetcherError),
12
13 #[error("publisher failed: {0}")]
14 Publisher(#[from] PublisherError),
15
16 #[error("outbox writer failed: {0}")]
17 Writer(#[from] OutboxWriterError),
18
19 #[error("unit of work error: {0}")]
20 UnitOfWork(#[from] UnitOfWorkError),
21
22 #[error("unit of work factory error: {0}")]
23 UnitOfWorkFactory(#[from] UnitOfWorkFactoryError),
24
25 #[error("outbox error: {0}")]
26 Outbox(#[from] OutboxError),
27
28 #[error("outbox state must be pending but was {0:?}")]
29 NonPendingOutboxState(OutboxState),
30}