From 18906869d0f0c2bf6b824951ef3666faea4da8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sun, 23 Jan 2022 15:01:18 +0200 Subject: [PATCH] Add Bad Gateway exception --- trakt/errors.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trakt/errors.py b/trakt/errors.py index 8a54cd48..9dce8807 100644 --- a/trakt/errors.py +++ b/trakt/errors.py @@ -17,6 +17,7 @@ 'LockedUserAccountException', 'RateLimitException', 'TraktInternalException', + 'TraktBadGateway', 'TraktUnavailable', ] @@ -92,6 +93,12 @@ class TraktInternalException(TraktException): message = 'Internal Server Error' +class TraktBadGateway(TraktException): + """TraktException type to be raised when a 502 error is raised""" + http_code = 502 + message = 'Trakt Unavailable - Bad Gateway' + + class TraktUnavailable(TraktException): """TraktException type to be raised when a 503 error is raised""" http_code = 503