1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum AutonomicError {
8 #[error("rule evaluation failed: {0}")]
10 RuleEvaluation(String),
11
12 #[error("projection not found for session: {0}")]
14 ProjectionNotFound(String),
15
16 #[error("serialization error: {0}")]
18 Serialization(#[from] serde_json::Error),
19
20 #[error("event store error: {0}")]
22 EventStore(String),
23
24 #[error("configuration error: {0}")]
26 Config(String),
27}
28
29pub type AutonomicResult<T> = Result<T, AutonomicError>;