diff --git a/data/src/providers/common.rs b/data/src/providers/common.rs index 248df6064..4a263dc26 100644 --- a/data/src/providers/common.rs +++ b/data/src/providers/common.rs @@ -47,14 +47,14 @@ use serde::{Deserialize, Serialize}; /// # Examples /// /// ```rust -/// use data::providers::common::ErrorCategory; +/// use data::providers::common::ProviderErrorCategory; /// /// match error_category { -/// ErrorCategory::RateLimit => { +/// ProviderErrorCategory::RateLimit => { /// // Implement exponential backoff /// tokio::time::sleep(Duration::from_millis(1000)).await; /// }, -/// ErrorCategory::Authentication => { +/// ProviderErrorCategory::Authentication => { /// // Refresh credentials and reconnect /// provider.refresh_auth().await?; /// }, @@ -64,7 +64,7 @@ use serde::{Deserialize, Serialize}; /// } /// ``` #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] -pub enum ErrorCategory { +pub enum ProviderErrorCategory { /// Network connectivity issues, WebSocket disconnections /// /// Indicates problems with the underlying network connection to the diff --git a/ml/src/lib.rs b/ml/src/lib.rs index 6a6375140..65279613b 100644 --- a/ml/src/lib.rs +++ b/ml/src/lib.rs @@ -457,15 +457,8 @@ impl CommonError { } } -/// Error categories for system-wide error classification -/// -/// This enum provides a way to categorize errors across the entire system, -/// enabling better error handling, logging, and monitoring strategies. -#[derive(Debug, Clone, Copy, PartialEq, Eq, serde::Serialize, serde::Deserialize)] -pub enum ErrorCategory { - /// System-level errors including hardware, network, and infrastructure issues - System, -} +// Re-export canonical ErrorCategory from common crate (24 variants) +pub use ::common::error::ErrorCategory; // Now using real types from common crate