Files
YANPM/apps/api/src/errors/service_error.rs
GW_MC f4e6eb56c8
All checks were successful
Test / verify-generated-code (pull_request) Successful in 7m57s
Test / test (pull_request) Successful in 1m9s
Test / lint (pull_request) Successful in 1m9s
Update sea-orm dependencies to use workspace configuration; add dead code annotations in service error handling and settings service
2025-12-02 17:12:24 +08:00

16 lines
364 B
Rust

pub type ServiceError = Box<dyn std::error::Error + Send + Sync>;
#[allow(dead_code)] // TODO: remove when used
pub trait IntoServiceError {
fn into_service_error(self) -> ServiceError;
}
impl<T> IntoServiceError for T
where
T: std::error::Error + Send + Sync + 'static,
{
fn into_service_error(self) -> ServiceError {
Box::new(self)
}
}