event_sourcing/error/store_error.rs
1use crate::error::AdapterError;
2use snafu::Snafu;
3use uuid::Uuid;
4
5#[derive(Debug, Snafu)]
6#[snafu(visibility(pub(crate)))]
7pub enum StoreError {
8 AdapterError {
9 source: AdapterError,
10 },
11
12 #[snafu(display("Aggregate with id '{aggregate_id}' does not exist"))]
13 AggregateDoesNotExist {
14 aggregate_id: Uuid,
15 },
16
17 #[snafu(display("An unknown error occurred when storing the events"))]
18 Unknown,
19}