diff --git a/src/utils/http.py b/src/utils/http.py index 5dac7e90..ac46ce6b 100644 --- a/src/utils/http.py +++ b/src/utils/http.py @@ -15,11 +15,15 @@ SOUP_CONTENT_TYPES = ["text/html", "text/xml", "application/xml"] class HTTPException(Exception): pass class HTTPTimeoutException(HTTPException): - pass + def __init__(self): + Exception.__init__(self, "HTTP request timed out") class HTTPParsingException(HTTPException): + def __init__(self): + Exception.__init__(self, "HTTP parsing failed") pass class HTTPWrongContentTypeException(HTTPException): - pass + def __init__(self): + Exception.__init__(self, "HTTP request gave wrong content type") def throw_timeout(): raise HTTPTimeoutException()