diff --git a/api/api_errors.py b/api/api_errors.py index 56c7f25..995ec4f 100644 --- a/api/api_errors.py +++ b/api/api_errors.py @@ -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],