mirror of
https://github.com/beetbox/beets.git
synced 2025-12-29 12:02:44 +01:00
Merge pull request #5025 from arsaboo/spotify_connection
Spotify: fix ConnectionError handling
This commit is contained in:
commit
9955e7a9f7
2 changed files with 4 additions and 0 deletions
|
|
@ -184,6 +184,9 @@ class SpotifyPlugin(MetadataSourcePlugin, BeetsPlugin):
|
|||
except requests.exceptions.ReadTimeout:
|
||||
self._log.error("ReadTimeout.")
|
||||
raise SpotifyAPIError("Request timed out.")
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
self._log.error(f"Network error: {e}")
|
||||
raise SpotifyAPIError("Network error.")
|
||||
except requests.exceptions.RequestException as e:
|
||||
if e.response.status_code == 401:
|
||||
self._log.debug(
|
||||
|
|
|
|||
|
|
@ -148,6 +148,7 @@ New features:
|
|||
|
||||
Bug fixes:
|
||||
|
||||
* :doc:`/plugins/spotify`: Improve handling of ConnectionError.
|
||||
* :doc:`/plugins/deezer`: Improve Deezer plugin error handling and set requests timeout to 10 seconds.
|
||||
:bug:`4983`
|
||||
* :doc:`/plugins/spotify`: Add bad gateway (502) error handling.
|
||||
|
|
|
|||
Loading…
Reference in a new issue