From 2f77ff59facc2f720a2e1a7ef08d53d008bf2815 Mon Sep 17 00:00:00 2001 From: Robert Honz Date: Fri, 17 Oct 2025 11:01:23 +0200 Subject: [PATCH] =?UTF-8?q?fix(Tidal):=20=F0=9F=90=9B=20handle=20all=20exc?= =?UTF-8?q?eptions=20during=20token=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. --- tidal_dl_ng/config.py | 3 +-- 1 file changed, 1 insertion(+), 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):