use thiserror::Error;
#[derive(Debug, Error)]
pub enum AnalyticsError {
#[error("Analytics config error: {0}")]
Config(String),
#[error("Anomaly detection error: {0}")]
Anomaly(#[from] crate::anomaly::AnomalyError),
#[error("Forecast error: {0}")]
Forecast(#[from] crate::forecast::ForecastError),
#[error("Series not configured: {0}")]
NotConfigured(String),
#[error("Duplicate configuration: {0}")]
Duplicate(String),
#[error("Analytics internal error: {0}")]
Internal(String),
}
pub type Result<T> = std::result::Result<T, AnalyticsError>;