From cf1e35867c05d483eca2c578662630407f312f6b Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sun, 8 Mar 2026 14:28:03 -0700 Subject: [PATCH] HTTP4XX and HTTP5XX should inheret from my class. --- voussoirkit/httperrors.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/voussoirkit/httperrors.py b/voussoirkit/httperrors.py index 9987626..aeb4816 100644 --- a/voussoirkit/httperrors.py +++ b/voussoirkit/httperrors.py @@ -35,7 +35,11 @@ code will not be affected. ''' import requests -class HTTP4XX(requests.exceptions.HTTPError): pass +class HTTPError(requests.exceptions.HTTPError): + def __str__(self): + return type(self).__name__ + +class HTTP4XX(HTTPError): pass class HTTP400(HTTP4XX): pass class HTTP401(HTTP4XX): pass class HTTP402(HTTP4XX): pass @@ -137,7 +141,7 @@ class HTTP497(HTTP4XX): pass class HTTP498(HTTP4XX): pass class HTTP499(HTTP4XX): pass -class HTTP5XX(requests.exceptions.HTTPError): pass +class HTTP5XX(HTTPError): pass class HTTP500(HTTP5XX): pass class HTTP501(HTTP5XX): pass class HTTP502(HTTP5XX): pass