|
@@ -5,9 +5,8 @@ from src.core.callcenter.enumeration import BizErrorCode
|
|
|
|
|
|
class BizException(Exception):
|
|
|
def __init__(self, message, status_code=400):
|
|
|
- if isinstance(message, BizErrorCode):
|
|
|
- message = message.value
|
|
|
- status_code = message.code
|
|
|
+ if isinstance(message, tuple):
|
|
|
+ status_code, message = message
|
|
|
super().__init__(message)
|
|
|
self.message = message
|
|
|
self.status_code = status_code
|