forked from p15670423/monkey
Agent: Catch requests.JSONDecodeError
This commit is contained in:
parent
823829c001
commit
fe2c1f29fa
|
@ -61,7 +61,7 @@ def convert_json_error_to_island_api_error(fn):
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
try:
|
try:
|
||||||
return fn(*args, **kwargs)
|
return fn(*args, **kwargs)
|
||||||
except json.JSONDecodeError as err:
|
except (requests.JSONDecodeError, json.JSONDecodeError) as err:
|
||||||
raise IslandAPIRequestFailedError(err)
|
raise IslandAPIRequestFailedError(err)
|
||||||
|
|
||||||
return wrapper
|
return wrapper
|
||||||
|
|
Loading…
Reference in New Issue