From ee4a595b8095e7e1f8f4c08c917ec68902346e8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 28 May 2026 19:03:58 +0300 Subject: [PATCH 1/2] Add __str__ to OAuthRefreshException --- trakt/errors.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/trakt/errors.py b/trakt/errors.py index 190271c..9d98353 100644 --- a/trakt/errors.py +++ b/trakt/errors.py @@ -81,6 +81,14 @@ def error(self): def error_description(self): return self.data["error_description"] + def __str__(self): + if self.error and self.error_description: + return f'{self.message}: {self.error} - {self.error_description}' + + if self.error: + return f'{self.message}: {self.error}' + + return self.message class ForbiddenException(TraktException): """TraktException type to be raised when a 403 return code is received""" From 18149c126d8d4fab663133574675fc8dc58a2642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 28 May 2026 19:20:49 +0300 Subject: [PATCH 2/2] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- trakt/errors.py | 1 + 1 file changed, 1 insertion(+) diff --git a/trakt/errors.py b/trakt/errors.py index 9d98353..202fd6b 100644 --- a/trakt/errors.py +++ b/trakt/errors.py @@ -90,6 +90,7 @@ def __str__(self): return self.message + class ForbiddenException(TraktException): """TraktException type to be raised when a 403 return code is received"""