Skip to content
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

fix: don't rely on duck typing for _retry.is_transient_error #425

Merged
merged 2 commits into from
May 14, 2020

Conversation

chrisrossi
Copy link
Contributor

In _retry.is_transient_error, we now check to make sure the exception
is an instance of grpc.Call before examining its code attribute. We
also make sure code is callable before calling it.

Fixes #415

@chrisrossi chrisrossi requested a review from cguardia May 13, 2020 15:02
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 13, 2020
Copy link
Contributor

@cguardia cguardia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

Chris Rossi added 2 commits May 14, 2020 10:52
In `_retry.is_transient_error`, we now check to make sure the exception
is an instance of `grpc.Call` before examining its `code` attribute. We
also make sure `code` is callable before calling it.

Fixes googleapis#415
@chrisrossi chrisrossi merged commit 4524542 into googleapis:master May 14, 2020
@chrisrossi chrisrossi deleted the fix-415 branch May 14, 2020 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

in a transaction: TypeError: 'int' object is not callable
3 participants