Catch json decode error in loading data

This commit is contained in:
Mouse Reeve 2020-12-03 13:42:02 -08:00
parent b1640c5dc9
commit 27c45c0584

View file

@ -315,7 +315,11 @@ def get_data(url):
raise ConnectorException()
if not resp.ok:
resp.raise_for_status()
data = resp.json()
try:
data = resp.json()
except ValueError:
raise ConnectorException()
return data