Fix strange errors
This commit is contained in:
parent
d51ffa0eb2
commit
58a19c7a41
@ -20,6 +20,9 @@ API_ERROR_INVALID_TOKEN = (503, 'invalid token')
|
||||
|
||||
def make_error_object(ex: Exception):
|
||||
try:
|
||||
if type(ex.args[0]) != tuple:
|
||||
raise Exception(API_ERROR_INTERNAL_ERROR)
|
||||
|
||||
data = {
|
||||
"error": {
|
||||
"code": ex.args[0][0],
|
||||
|
Reference in New Issue
Block a user