feature/api-setup #4

Merged
GW_MC merged 11 commits from feature/api-setup into master 2025-12-02 17:25:47 +08:00
2 changed files with 15 additions and 0 deletions
Showing only changes of commit 8b98590a1e - Show all commits

1
apps/api/src/errors.rs Normal file
View File

@@ -0,0 +1 @@
pub mod service_error;

View File

@@ -0,0 +1,14 @@
pub type ServiceError = Box<dyn std::error::Error + Send + Sync>;
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)
}
}