Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PR feedback. Add temporarily_unavailable as a retryable status_code.
  • Loading branch information
clundin25 committed Sep 6, 2022
commit 7863cc6dd266b82495c3bc34f4accf3e700d25c2
2 changes: 1 addition & 1 deletion google/oauth2/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _can_retry(status_code, response_data):

# Per Oauth 2.0 RFC https://www.rfc-editor.org/rfc/rfc6749.html#section-4.1.2.1
# This is needed because a redirect will not return a 500 status code.
retryable_error_descriptions = {"internal_failure", "server_error"}
retryable_error_descriptions = {"internal_failure", "server_error", "temporarily_unavailable"}

if any(e in retryable_error_descriptions for e in (error_code, error_desc)):
return True
Expand Down