GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add support for 'error_info' by atulep · Pull Request #307 · googleapis/python-api-core

This repository was archived by the owner on Feb 23, 2026. It is now read-only.

Conversation

@atulep

@atulep atulep commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

Adds error_info field to GoogleAPICallError, as requested in #286.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Aza Tulepbergenov
feat: Adds support for error_info.
db97527
@atulep
atulep requested review from a team and summer-ji-eng November 8, 2021 21:32
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Nov 8, 2021
Aza Tulepbergenov added 2 commits November 8, 2021 13:33
Aza Tulepbergenov
Merge branch 'main' into feat_error_details2
7c02189
Aza Tulepbergenov
chore: fixes docstring.
cb6ead7
@tseaver tseaver changed the title feat: Adds support for error_info. feat: add support for 'error_info' Nov 9, 2021
tseaver
tseaver suggested changes Nov 9, 2021
View reviewed changes

@tseaver tseaver left a comment

Copy link
Copy Markdown
Contributor

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.

All returns from _parse_grpc_error_details must return a 2-tuple.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/api_core/exceptions.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@atulep @tseaver
Update google/api_core/exceptions.py
626b992
Co-authored-by: Tres Seaver <[email protected]>
@google-cla

google-cla Bot commented Nov 9, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla google-cla Bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 9, 2021
@google-cla

google-cla Bot commented Nov 9, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Aza Tulepbergenov
chore: fixes flaky test.
24b0467
@google-cla

google-cla Bot commented Nov 9, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Nov 9, 2021

Copy link
Copy Markdown
Contributor

@googlebot I consent.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@google-cla

google-cla Bot commented Nov 9, 2021

Copy link
Copy Markdown

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Nov 9, 2021

Copy link
Copy Markdown
Contributor

@atulep The CLA bot has (once again) lost its tiny mind. You'll need to remove the cla: no label and add the cla: yes label manually.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@atulep

atulep commented Nov 10, 2021

Copy link
Copy Markdown
Contributor Author

@atulep The CLA bot has (once again) lost its tiny mind. You'll need to remove the cla: no label and add the cla: yes label manually.

Hey @tseaver, it seems to complain because email used in the commit "@palladion.com" is different than the one you used to sign CLA with. The docs suggest "If the email address does not match an email found, please ask the contributor to either add their new email address to their CLA or rebase their commits with their correct email address." Can you please do that?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

summer-ji-eng
summer-ji-eng reviewed Nov 10, 2021
View reviewed changes
Comment thread google/api_core/exceptions.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

summer-ji-eng
summer-ji-eng previously requested changes Nov 10, 2021
View reviewed changes

@summer-ji-eng summer-ji-eng left a comment

Copy link
Copy Markdown

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.

Left one comment, other than that, looks good to me. :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tseaver

tseaver commented Nov 10, 2021

Copy link
Copy Markdown
Contributor

@atulep

it seems to complain because email used in the commit "@palladion.com" is different than the one you used to sign CLA with.

The error message is incorrect -- all my commits in the googleapis / GoogleCloudPlatform organzations for the past seven years have been signed with that e-mail address, which is also the only one associated with my Github profile. Sometimes (I don't know that pattern) the bot balks at merged through-the-web suggestions (which is the case here).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver
tseaver suggested changes Nov 10, 2021
View reviewed changes
Comment thread tests/unit/test_exceptions.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google/api_core/exceptions.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@atulep

atulep commented Nov 10, 2021

Copy link
Copy Markdown
Contributor Author

@atulep

it seems to complain because email used in the commit "@palladion.com" is different than the one you used to sign CLA with.

The error message is incorrect -- all my commits in the googleapis / GoogleCloudPlatform organzations for the past seven years have been signed with that e-mail address, which is also the only one associated with my Github profile. Sometimes (I don't know that pattern) the bot balks at merged through-the-web suggestions (which is the case here).

I checked the internal dashboards, and it shows you signed CLA with a "@gmail.com" address. This is the official instruction I was told to follow:

One of the most common problems is that the git author email in the commit is not an email address associated with a CLA. The solution is to change the git author email to be an address covered by the CLA. That email should also be added to their GitHub account; it doesn't need to be the primary email, but it should be on the account.

I know you're an active contributor, so this is really weird to see an CLA issue. Can you share a similar issue from the past where a Googler manually removed the CLA label? Thank you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Nov 10, 2021

Copy link
Copy Markdown
Contributor

@tswast, @busunkim96 Can one of you please tag in on the manual CLA flip?

tswast reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tswast tswast added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 10, 2021
@google-cla google-cla Bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 10, 2021
@vam-google

vam-google commented Nov 10, 2021

Copy link
Copy Markdown
Contributor

@googlebot I fixed it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@atulep atulep added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 10, 2021
Aza Tulepbergenov
pr: addresses pr feedback.
331d6e3
@google-cla google-cla Bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 15, 2021
@atulep atulep added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Nov 15, 2021
Aza Tulepbergenov
Merge branch 'main' into feat_error_details2
d62a0dd
@google-cla google-cla Bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 15, 2021
@atulep

atulep commented Nov 15, 2021

Copy link
Copy Markdown
Contributor Author

@summer-ji-eng @tseaver - finally addressed your feedback. Thanks for your comments!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@atulep
atulep requested review from summer-ji-eng and tseaver November 15, 2021 20:56
tseaver
tseaver approved these changes Nov 16, 2021
View reviewed changes
@tseaver
tseaver dismissed summer-ji-eng’s stale review November 16, 2021 18:19

Requested changes made in 331d6e3

@tseaver

tseaver commented Nov 16, 2021

Copy link
Copy Markdown
Contributor

@atulep the CLA flag has to be cleared again after pushing any commit, even a merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

summer-ji-eng
summer-ji-eng approved these changes Nov 17, 2021
View reviewed changes

@summer-ji-eng summer-ji-eng left a comment

Copy link
Copy Markdown

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.

🚀

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@atulep atulep added the cla: yes This human has signed the Contributor License Agreement. label Nov 17, 2021
@google-cla google-cla Bot removed the cla: no This human has *not* signed the Contributor License Agreement. label Nov 17, 2021
@tswast tswast added cla: yes This human has signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Nov 17, 2021
@atulep

atulep commented Nov 17, 2021

Copy link
Copy Markdown
Contributor Author

@tseaver I manually flipped the flag but it still blocks me from merging.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

software-dov
software-dov approved these changes Nov 19, 2021
View reviewed changes

@software-dov software-dov left a comment

Copy link
Copy Markdown
Contributor

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.

Looks good, just some nitpicking.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/api_core/exceptions.py
Comment on lines +161 to +163
if not self._error_info:
return None
return self._error_info.reason

@software-dov software-dov Nov 19, 2021

Copy link
Copy Markdown
Contributor

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.

Nit: we can simplify this to

return self._error_info.reason if self._error_info else None

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/api_core/exceptions.py
Comment on lines +175 to +177
if not self._error_info:
return None
return self._error_info.domain

@software-dov software-dov Nov 19, 2021

Copy link
Copy Markdown
Contributor

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.

Same here: we can use conditional expressions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/api_core/exceptions.py
Comment on lines +189 to +191
if not self._error_info:
return None
return self._error_info.metadata

@software-dov software-dov Nov 19, 2021

Copy link
Copy Markdown
Contributor

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.

And here, same as above.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google/api_core/exceptions.py
Comment on lines +481 to +487
error_info = list(
filter(
lambda detail: detail.get("@type", "")
== "type.googleapis.com/google.rpc.ErrorInfo",
details,
)
)

@software-dov software-dov Nov 19, 2021

Copy link
Copy Markdown
Contributor

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.

Nit: it's more idiomatic to use list comprehensions than list and filter.

error_info_type = "type.googleapis.com/google.rpc.ErrorInfo"
error_info = [d for d in details if d.get("@type", "") == error_info_type]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@atulep atulep mentioned this pull request Nov 29, 2021
feat: add support for 'error_info' #315
Merged
@atulep

atulep commented Nov 29, 2021

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #315.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@atulep atulep closed this Nov 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

3 more reviewers
@tseaver tseaver tseaver approved these changes
@software-dov software-dov software-dov approved these changes
@summer-ji-eng summer-ji-eng summer-ji-eng approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@atulep @tseaver @vam-google @software-dov @summer-ji-eng @tswast
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.