mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-20 15:17:06 +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()
|
||||
data = resp.json()
|
||||
try:
|
||||
data = resp.json()
|
||||
except ValueError:
|
||||
raise ConnectorException()
|
||||
|
||||
return data
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue