sim_lib_operation_gate/
operation_error.rs1use sim_lib_journal::JournalError;
2use thiserror::Error;
3
4#[derive(Debug, Error)]
6pub enum OperationError {
7 #[error("operation name is empty")]
9 EmptyOperation,
10 #[error("noncanonical {0}")]
12 NonCanonical(&'static str),
13 #[error("contradictory intent under one operation id")]
15 ContradictoryIntent,
16 #[error("operation grant does not match intent")]
18 GrantMismatch,
19 #[error("operation attempt does not match intent")]
21 AttemptMismatch,
22 #[error("durable operation contains duplicate intent")]
24 DuplicateIntent,
25 #[error("invalid durable operation transition: {0}")]
27 InvalidTransition(&'static str),
28 #[error("operation service must be explicitly resumed")]
30 NotResumed,
31 #[error("operation journal sequence is exhausted")]
33 SequenceExhausted,
34 #[error(transparent)]
36 Journal(#[from] JournalError),
37}