Fix strange errors

This commit is contained in:
vlados31 2022-09-17 20:09:49 +03:00
parent d51ffa0eb2
commit 58a19c7a41

View File

@ -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],