10000 remove misleading raise_for_status by TAOXUY · Pull Request #2948 · GoogleCloudPlatform/python-docs-samples · GitHub
[go: up one dir, main page]

Skip to content

remove misleading raise_for_status #2948

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

Merged

Conversation

TAOXUY
Copy link
Contributor
@TAOXUY TAOXUY commented Feb 20, 2020

When the response has error, the error detail is not exposed because of raise_for_status, so remove it and show the detailed message.

For instance, the detailed error is UNAUTHENTICATED:Method doesn't allow unregistered callers (callers without established identity). Please use API Key or other form of API consumer identity to call this API.
but we only got requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url.

@TAOXUY TAOXUY requested review from daniel-sanche and a team as code owners February 20, 2020 20:32
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 20, 2020
@TAOXUY TAOXUY requested a review from nnegrey as a code owner February 20, 2020 22:43
@TAOXUY
Copy link
Contributor Author
TAOXUY commented Feb 21, 2020

Please take a look

@TAOXUY
Copy link
Contributor Author
TAOXUY commented Feb 21, 2020

/retest

@leahecole leahecole removed the request for review from nnegrey April 17, 2020 18:15
@leahecole
Copy link
Collaborator

@daniel-sanche can you take another look at this please?

@TAOXUY TAOXUY requested a review from busunkim96 April 29, 2020 19:06
@TAOXUY
Copy link
Contributor Author
TAOXUY commented Apr 29, 2020

@busunkim96, please take a look.

@TAOXUY
Copy link
Contributor Author
TAOXUY commented May 5, 2020

@busunkim96, please take a look.

@busunkim96 busunkim96 added the automerge Merge the pull request once unit tests and other checks pass. label May 5, 2020
@busunkim96
Copy link
Contributor

Thank you for the contribution @TAOXUY!

@gcf-merge-on-green gcf-merge-on-green bot merged commit cf0fcc0 into GoogleCloudPlatform:master May 5, 2020
@TAOXUY TAOXUY deleted the raise_for_status branch May 5, 2020 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0