Files
Oxicloud/src/common/errors.rs
T

19 lines
807 B
Rust
Raw Normal View History

//! Application errors
//!
//! This module re-exports domain errors for compatibility.
//! Infrastructure error conversions (sqlx, serde_json, etc.)
//! are located in infrastructure/adapters/error_adapters.rs, following
//! Clean Architecture principles where the domain should not know about
//! infrastructure details.
2025-03-19 00:44:27 +01:00
// Re-export domain errors for compatibility
pub use crate::domain::errors::{DomainError, ErrorKind, Result};
// Infrastructure error conversions have been moved to:
2026-02-06 20:57:00 +01:00
// crate::infrastructure::adapters::error_adapters
//
// To convert infrastructure errors to DomainError, use:
// - The IntoDomainError trait for explicit conversions with context
// - Or handle errors in infrastructure repositories/services
// using map_err() with DomainError::internal_error() or similar methods