diff --git a/monkey/infection_monkey/island_api_client/http_island_api_client.py b/monkey/infection_monkey/island_api_client/http_island_api_client.py index d34a4ac6f..227c700e9 100644 --- a/monkey/infection_monkey/island_api_client/http_island_api_client.py +++ b/monkey/infection_monkey/island_api_client/http_island_api_client.py @@ -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