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    /// A durable append whose outcome must be resolved before retrying.
5    #[error("unresolved publish: {append}")]
6    PublishUnresolved {
7        append: crate::durability::UnresolvedAppend,
8    },
9
10    /// Authoritative lookup of a producer's original publish could not be read.
11    #[error("channel {channel} cannot resolve idempotency key {idempotency_key}: {message}")]
12    ResolutionUnreadable {
13        channel: String,
14        idempotency_key: String,
15        message: String,
16    },
17
18    /// The requested channel does not exist.
19    #[error("{message}")]
20    ChannelNotFound { message: String },
21
22    /// The requested channel is closed.
23    #[error("{message}")]
24    ChannelClosed { message: String },
25
26    /// A payload does not match the channel schema.
27    #[error("{message}")]
28    SchemaMismatch { message: String },
29
30    /// Publishing a payload failed.
31    #[error("{message}")]
32    PublishFailed { message: String },
33
34    /// Creating or maintaining a subscription failed.
35    #[error("{message}")]
36    SubscriptionFailed { message: String },
37
38    /// Conversation execution failed.
39    #[error("{message}")]
40    ConversationFailed { message: String },
41
42    /// Conversation execution timed out.
43    #[error("{message}")]
44    ConversationTimeout { message: String },
45
46    /// A linked participant process crashed.
47    #[error("{message}")]
48    ParticipantCrashed { message: String },
49
50    /// Delivering a payload failed.
51    #[error("{message}")]
52    DeliveryFailed { message: String },
53}