修正
This commit is contained in:
11
backend/app/core/exceptions.py
Normal file
11
backend/app/core/exceptions.py
Normal file
@@ -0,0 +1,11 @@
|
||||
from fastapi import HTTPException
|
||||
|
||||
class BusinessException(HTTPException):
|
||||
def __init__(self, error_code: str, message: str):
|
||||
super().__init__(
|
||||
status_code=400,
|
||||
detail={
|
||||
"error_code": error_code,
|
||||
"message": message
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user