-
Notifications
You must be signed in to change notification settings - Fork 109
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
Retain error details in string representation of errors generated by ApiTools. #266
Conversation
71e9c82
to
cfb2304
Compare
R: @houglum |
cc: @chamikaramj , @aaltay. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Pulled the changes into a local clone of gsutil and ran integration tests (both XML and JSON) in Py2 and Py3 - everything passed, so this is fine from the gsutil end :)
@houglum @jameslynnwu @kevinli7 |
Thanks for the review, @houglum . |
@houglum @jameslynnwu @kevinli7 Folks, do you know, when do we might have next apitools release? We are about to cut a new Beam release and I was wondering if we could upgrade to a new version of apitools that has this change. Thank you. |
@jameslynnwu @kevinli7 I can roll up a new release if neither of you have anything you'd like to get in before the next version. |
Done. 0.5.28 is out now @tvalentyn |
Thanks a lot @houglum ! I really appreciate it! |
Currently errors defined in ApiTools don't capture error message details in string representations of the errors:
This PR changes this behavior, for example:
Calling constructor of the superclass with one argument helps to capture the details of exception, as defined[1] in BaseException, the superclass of Exception, the superclass of apitools.base.py.exceptions.Error.
[1] https://github.com/python/cpython/blob/db7197543112954b0912e3d46e39fefcb1c3b950/Objects/exceptions.c#L111.