Skip to main content

liminal/
error.rs

1/// Error taxonomy for liminal channel, conversation, schema, and delivery failures.
2#[derive(Debug, thiserror::Error)]
3pub enum LiminalError {
4    /// The requested channel does not exist.
5    #[error("{message}")]
6    ChannelNotFound { message: String },
7
8    /// The requested channel is closed.
9    #[error("{message}")]
10    ChannelClosed { message: String },
11
12    /// A payload does not match the channel schema.
13    #[error("{message}")]
14    SchemaMismatch { message: String },
15
16    /// Publishing a payload failed.
17    #[error("{message}")]
18    PublishFailed { message: String },
19
20    /// Creating or maintaining a subscription failed.
21    #[error("{message}")]
22    SubscriptionFailed { message: String },
23
24    /// Conversation execution failed.
25    #[error("{message}")]
26    ConversationFailed { message: String },
27
28    /// Conversation execution timed out.
29    #[error("{message}")]
30    ConversationTimeout { message: String },
31
32    /// A linked participant process crashed.
33    #[error("{message}")]
34    ParticipantCrashed { message: String },
35
36    /// Delivering a payload failed.
37    #[error("{message}")]
38    DeliveryFailed { message: String },
39}