feature/upstream-service #13

Merged
GW_MC merged 43 commits from feature/upstream-service into master 2026-01-01 10:49:32 +08:00
Showing only changes of commit 4f85d88380 - Show all commits

View File

@@ -1,4 +1,5 @@
use axum::response::IntoResponse; use axum::response::IntoResponse;
use sea_orm::DbErr;
use crate::errors::service_error::ServiceError; use crate::errors::service_error::ServiceError;
@@ -12,6 +13,12 @@ impl From<ServiceError> for ApiError {
} }
} }
impl From<DbErr> for ApiError {
fn from(err: DbErr) -> Self {
ServiceError::from(err).into()
}
}
impl IntoResponse for ApiError { impl IntoResponse for ApiError {
fn into_response(self) -> axum::response::Response { fn into_response(self) -> axum::response::Response {
match self { match self {