Skip to main content

de_mls/ds/
error.rs

1#[cfg(feature = "waku")]
2use crate::ds::waku::wrapper::WakuFfiError;
3
4/// Errors originating from the delivery service layer.
5#[derive(Debug, thiserror::Error)]
6pub enum DeliveryServiceError {
7    #[cfg(feature = "waku")]
8    #[error("Waku publish failed: {0}")]
9    WakuPublish(#[source] WakuFfiError),
10
11    #[cfg(feature = "waku")]
12    #[error("Waku node startup failed: {0}")]
13    WakuStartup(#[source] WakuFfiError),
14
15    #[cfg(feature = "waku")]
16    #[error("Waku connect peer failed: {0}")]
17    WakuConnectPeer(#[source] WakuFfiError),
18
19    #[error("Failed to spawn delivery-service thread: {0}")]
20    ThreadSpawn(#[source] std::io::Error),
21
22    #[cfg(feature = "waku")]
23    #[error("Waku node channel closed")]
24    WakuChannelClosed,
25
26    #[error("Lock poisoned: {0}")]
27    LockPoisoned(&'static str),
28}