mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Trying to catch more http request errors
This commit is contained in:
parent
c9354a5ad1
commit
6e97592518
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ from dateutil import parser
|
|||
import pytz
|
||||
import requests
|
||||
from requests import HTTPError
|
||||
from urllib3.exceptions import RequestError
|
||||
|
||||
from django.db import transaction
|
||||
|
||||
|
@ -298,7 +299,7 @@ def get_data(url):
|
|||
'Accept': 'application/json; charset=utf-8',
|
||||
},
|
||||
)
|
||||
except ConnectionError:
|
||||
except RequestError:
|
||||
raise ConnectorException()
|
||||
if not resp.ok:
|
||||
resp.raise_for_status()
|
||||
|
|
Loading…
Reference in a new issue