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 retry if error or error_description is not string #1241

Merged
merged 3 commits into from
Mar 1, 2023

Conversation

arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented Mar 1, 2023

If users forget to set quota project id in user credential ADC file, and reauth is needed, the server returns the following error:

{'error': 
    {'code': 403, 
      'message': "Your application has authenticated using end user credentials from the Google Cloud SDK or Google Cloud Shell which are not supported by the reauth.googleapis.com. We recommend configuring the billing/quota_project setting in gcloud or using a service account through the auth/impersonate_service_account setting..."
    }
}

Note that the 'error' value is not a string, so the if any(e in retryable_error_descriptions for e in (error_code, error_desc)) line throws an exception saying unhashable type: 'dict'. We should simply return if either error or error_description is not a string.

Internal bug: b/270627288

This PR also fixes a flaky sample test by setting a 10 seconds clock skew when verifying id token.

@arithmetic1728 arithmetic1728 marked this pull request as ready for review March 1, 2023 03:06
@arithmetic1728 arithmetic1728 requested review from a team as code owners March 1, 2023 03:06
@arithmetic1728 arithmetic1728 requested a review from a team as a code owner March 1, 2023 03:16
@arithmetic1728 arithmetic1728 merged commit e2d263a into main Mar 1, 2023
@arithmetic1728 arithmetic1728 deleted the fix_reauth branch March 1, 2023 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants