Agent: Catch requests.JSONDecodeError

This commit is contained in:
Mike Salvatore 2022-09-22 08:01:10 -04:00
parent 823829c001
commit fe2c1f29fa
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ def convert_json_error_to_island_api_error(fn):
def wrapper(*args, **kwargs):
try:
return fn(*args, **kwargs)
except json.JSONDecodeError as err:
except (requests.JSONDecodeError, json.JSONDecodeError) as err:
raise IslandAPIRequestFailedError(err)
return wrapper