Catch ConnectionResetError when making API request
Caught this traceback in the log when an update failed to complete. Also added a generic Exception catch-all.
This commit is contained in:
parent
9c414154fb
commit
968c17a357
@ -76,7 +76,7 @@ class ScoresBackend(SettingsBase):
|
|||||||
exc.code, exc.reason, exc.url,
|
exc.code, exc.reason, exc.url,
|
||||||
)
|
)
|
||||||
return {}
|
return {}
|
||||||
except URLError as exc:
|
except (ConnectionResetError, URLError) as exc:
|
||||||
self.logger.critical('Error making request to %s: %s', url, exc)
|
self.logger.critical('Error making request to %s: %s', url, exc)
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user