Archived
Fix strange errors
This commit is contained in:
1 parent
d51ffa0eb2
commit
58a19c7a41
1 file changed
+3
@@ -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