2026-02-12 09:41:25 +01:00
|
|
|
//! Application errors
|
2026-02-02 23:56:40 +01:00
|
|
|
//!
|
2026-02-12 09:41:25 +01:00
|
|
|
//! 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
|
|
|
|
2026-02-12 09:41:25 +01:00
|
|
|
// Re-export domain errors for compatibility
|
2026-02-02 23:56:40 +01:00
|
|
|
pub use crate::domain::errors::{DomainError, ErrorKind, Result};
|
2025-03-24 16:47:42 +01:00
|
|
|
|
2026-02-12 09:41:25 +01:00
|
|
|
// Infrastructure error conversions have been moved to:
|
2026-02-06 20:57:00 +01:00
|
|
|
// crate::infrastructure::adapters::error_adapters
|
|
|
|
|
//
|
2026-02-12 09:41:25 +01:00
|
|
|
// 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
|