mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-20 23:26:42 +00:00
Catch json decode error in loading data
This commit is contained in:
parent
b1640c5dc9
commit
27c45c0584
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue