I normally print(repr()) the exception I got, for debugging purposes. I use repr() because for builtin exceptions, str() will print only the message, and not the exception type. But for HTTPError, the repr() of it is "HTTPError()", without further explanation...
HTTPError.__str__ already provides useful information: ``'HTTP Error %s: %s' % (self.code, self.msg)``, but since the change is minimal and useful, here is a patch.
Perhaps it would be more appropriate to set the BaseException.args attribute, or chain to its __init__() method, then you wouldn’t need a custom __repr__().