#[derive(Debug, thiserror::Error)]
pub enum JournalError {
#[error("journal commit outcome is indeterminate")]
CommitIndeterminate {
#[source]
source: Box<dyn std::error::Error + Send + Sync>,
},
#[error("Journal is full")]
Full,
#[error("Event not found: {0}")]
EventNotFound(String),
#[error("Writer not authorized")]
Unauthorized,
#[error("Causal ordering violation")]
CausalityViolation,
#[error("Subscription closed")]
SubscriptionClosed,
#[error("Journal reader does not support a fixed committed initial prefix")]
InitialPrefixUnsupported,
#[error(
"Journal does not support atomic append group '{group_id}' with {member_count} members"
)]
AtomicAppendUnsupported {
group_id: String,
member_count: usize,
},
#[error("Implementation error: {message}")]
Implementation {
message: String,
#[source]
source: Box<dyn std::error::Error + Send + Sync>,
},
}