diff options
| author | Robert Honz <exislow+github@gmail.com> | 2025-10-17 11:01:23 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2025-10-17 11:01:23 +0200 |
| commit | 2f77ff59facc2f720a2e1a7ef08d53d008bf2815 (patch) | |
| tree | fdcb63a9f4d2cc5b24d07605b74cb6fff2d6c11a /tidal_dl_ng | |
| parent | 4fbc4404f8ac643695690322548926f425b5debc (diff) | |
| download | tidal-dl-ng-2f77ff59facc2f720a2e1a7ef08d53d008bf2815.tar.gz | |
fix(Tidal): 🐛 handle all exceptions during token login
* Updated exception handling in the `login` method to catch all exceptions instead of just `HTTPError` and `JSONDecodeError`.
* This change ensures that any unexpected errors during the login process are handled gracefully, improving the robustness of the application.
Diffstat (limited to 'tidal_dl_ng')
| -rw-r--r-- | tidal_dl_ng/config.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tidal_dl_ng/config.py b/tidal_dl_ng/config.py index 345bebd..72b9f93 100644 --- a/tidal_dl_ng/config.py +++ b/tidal_dl_ng/config.py @@ -8,7 +8,6 @@ from threading import Event from typing import Any import tidalapi -from requests import HTTPError from tidal_dl_ng.helper.decorator import SingletonMeta from tidal_dl_ng.helper.path import path_config_base, path_file_settings, path_file_token @@ -129,7 +128,7 @@ class Tidal(BaseConfig, metaclass=SingletonMeta): self.data.expiry_time, is_pkce=do_pkce, ) - except (HTTPError, JSONDecodeError): + except Exception: result = False # Remove token file. Probably corrupt or invalid. if os.path.exists(self.file_path): |
