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: add exception context to GenericGBQExceptions #629

Merged
merged 2 commits into from
May 10, 2023

Conversation

quoimec
Copy link
Contributor

@quoimec quoimec commented May 9, 2023

The from keyword adds a __cause__ parameter to the thrown exception. This allows external applications access to the originally thrown exception.

My required usecase: my application has experienced BQ rate limiting errors but I am only getting GenericGBQExceptions out the other side, this change will allow me to be more nuanced with my error handling and apply rate limiting pauses only when appropriate.

@quoimec quoimec requested review from a team as code owners May 9, 2023 04:04
@quoimec quoimec requested a review from jainsahab May 9, 2023 04:04
@google-cla
Copy link

google-cla bot commented May 9, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@conventional-commit-lint-gcf
Copy link

conventional-commit-lint-gcf bot commented May 9, 2023

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: bigquery Issues related to the googleapis/python-bigquery-pandas API. labels May 9, 2023
@quoimec quoimec changed the title Added from Added from to GenericGBQExceptions May 9, 2023
@tswast tswast changed the title Added from to GenericGBQExceptions fix: add exception context to GenericGBQExceptions May 9, 2023
@tswast
Copy link
Collaborator

tswast commented May 9, 2023

Thanks, @quoimec ! This LGTM. Any thoughts on how we can unit test this?

@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 9, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 9, 2023
@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 9, 2023
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 9, 2023
@tswast tswast added the automerge Merge the pull request once unit tests and other checks pass. label May 9, 2023
@gcf-merge-on-green
Copy link

Merge-on-green attempted to merge your PR for 6 hours, but it was not mergeable because either one of your required status checks failed, one of your required reviews was not approved, or there is a do not merge label. Learn more about your required status checks here: https://help.github.com/en/github/administering-a-repository/enabling-required-status-checks. You can remove and reapply the label to re-run the bot.

@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label May 10, 2023
@tswast tswast added the owlbot:run Add this label to trigger the Owlbot post processor. label May 10, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label May 10, 2023
@tswast tswast merged commit d17ae24 into googleapis:main May 10, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-pandas API. size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants