-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
HTTPError doesn't have a good "repr" representation #68075
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
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: |
A test really should be added for this. Otherwise, LGTM. |
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__(). |
Hi Berker, I like your patch, will apply it after doing a test for it. |
New changeset e9ea679a92fa by Facundo Batista in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: