Add debug and BadRequest error

This commit is contained in:
GW_MC
2025-12-07 21:33:01 +08:00
parent 30e500ec44
commit 6a88e401f6

View File

@@ -1,10 +1,12 @@
use sea_orm::DbErr; use sea_orm::DbErr;
#[derive(Debug)]
pub enum ServiceError { pub enum ServiceError {
NotFound(String), NotFound(String),
DatabaseError(String), DatabaseError(String),
Unauthorized(String), Unauthorized(String),
InternalError(String), InternalError(String),
BadRequest(String),
} }
impl From<Box<dyn std::error::Error + Send + Sync + 'static>> for ServiceError { impl From<Box<dyn std::error::Error + Send + Sync + 'static>> for ServiceError {