yarli_cli/yarli-store/src/
error.rs1use thiserror::Error;
4use uuid::Uuid;
5
6#[derive(Debug, Error)]
8pub enum StoreError {
9 #[error("duplicate idempotency key: {0}")]
11 DuplicateIdempotencyKey(String),
12
13 #[error("duplicate event ID: {0}")]
15 DuplicateEventId(Uuid),
16
17 #[error("event not found: {0}")]
19 EventNotFound(Uuid),
20
21 #[error("serialization error: {0}")]
23 Serialization(#[from] serde_json::Error),
24
25 #[error("database error: {0}")]
27 Database(String),
28
29 #[error("runtime error: {0}")]
31 Runtime(String),
32
33 #[error("invalid entity type in store: {0}")]
35 InvalidEntityType(String),
36}