Catch json decode error in loading data
This commit is contained in:
@ -315,7 +315,11 @@ def get_data(url):
|
||||
raise ConnectorException()
|
||||
if not resp.ok:
|
||||
resp.raise_for_status()
|
||||
try:
|
||||
data = resp.json()
|
||||
except ValueError:
|
||||
raise ConnectorException()
|
||||
|
||||
return data
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user