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

Add retry loop for fetching authentication token if any 'Internal Failure' occurs #368

Merged
merged 2 commits into from Sep 9, 2019

Conversation

doneria-anjali
Copy link
Contributor

This is to prevent errors when client tries to connect with server and fails to fetch OAuth2 token throwing 'Internal Failure'.

Bug - https://bugs.chromium.org/p/chromium/issues/detail?id=1001206

adoneria added 2 commits September 6, 2019 16:56
…lure' occurs

This is to prevent errors while client tries to connect with server and
fails with 'Internal Failure' because it was unable to fetch OAuth2
token.
…lure' occurs

This is to prevent errors while client tries to connect with server and
fails with 'Internal Failure' because it was unable to fetch OAuth2
token.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Sep 7, 2019
@busunkim96 busunkim96 self-requested a review September 9, 2019 20:33
@busunkim96 busunkim96 merged commit eae1dcb into googleapis:master Sep 9, 2019
@georgysavva
Copy link
Contributor

Hi. I have the same issue and a retry would help. But I think there is a mistake in the current implementation. You are right, the error looks like that:

RefreshError: ('internal_failure: None', u'{\n "error": "internal_failure"\n}')
But this means that response body looks like this:

{"error": "internal_failure"}
And error_description isn't specified, so it will be None and the condition won't match.
You should use error filed instead. Because the error field actually contains string 'internal_failure'
What do you think? @busunkim96 @doneria-anjali

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.

None yet

4 participants