调整为http相应状态
This commit is contained in:
parent
746c8874c4
commit
a6f0e386c0
|
@ -35,7 +35,8 @@ def custom_exception_hander(exc, context):
|
|||
|
||||
if isinstance(exc.detail, (list, dict)):
|
||||
data = {'err_detail':exc.detail}
|
||||
data['err_codes'] = exc.get_codes()
|
||||
data['err_code'] = exc.default_code
|
||||
data['err_msg'] = exc.default_detail
|
||||
else:
|
||||
data = {'err_msg': exc.detail, 'err_code':exc.get_codes()}
|
||||
|
||||
|
|
Loading…
Reference in New Issue