chronix_analytics/lifecycle/error.rs
1//! Error types for the lifecycle management system.
2
3use thiserror::Error;
4
5/// Errors from lifecycle management operations.
6#[derive(Debug, Error)]
7pub enum LifecycleError {
8 /// Model or version not found.
9 #[error("Not found: {0}")]
10 NotFound(String),
11
12 /// Invalid configuration or parameter.
13 #[error("Invalid configuration: {0}")]
14 InvalidConfig(String),
15
16 /// A/B test evaluation error.
17 #[error("A/B test error: {0}")]
18 ABTest(String),
19
20 /// Drift detection error.
21 #[error("Drift detection error: {0}")]
22 Drift(String),
23
24 /// Serialization or persistence error.
25 #[error("Persistence error: {0}")]
26 Persistence(String),
27}
28
29/// Result alias for lifecycle operations.
30pub type Result<T> = std::result::Result<T, LifecycleError>;