feature/upstream-service #13
@@ -1,4 +1,5 @@
|
||||
use axum::response::IntoResponse;
|
||||
use sea_orm::DbErr;
|
||||
|
||||
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 {
|
||||
fn into_response(self) -> axum::response::Response {
|
||||
match self {
|
||||
|
||||
Reference in New Issue
Block a user