| Index: google_apis/gaia/oauth2_access_token_fetcher.cc
|
| diff --git a/google_apis/gaia/oauth2_access_token_fetcher.cc b/google_apis/gaia/oauth2_access_token_fetcher.cc
|
| index edefa7e33bde8b26e7ddd97e6280bcd6b6667ef4..731dab8127817326918512cc5438df4319bfe24c 100644
|
| --- a/google_apis/gaia/oauth2_access_token_fetcher.cc
|
| +++ b/google_apis/gaia/oauth2_access_token_fetcher.cc
|
| @@ -129,6 +129,15 @@ void OAuth2AccessTokenFetcher::EndGetAccessToken(
|
| return;
|
| }
|
|
|
| + // HTTP_FORBIDDEN (403) is treated as temporary error, because it may be
|
| + // '403 Rate Limit Exeeded.'
|
| + if (source->GetResponseCode() == net::HTTP_FORBIDDEN) {
|
| + OnGetTokenFailure(GoogleServiceAuthError(
|
| + GoogleServiceAuthError::SERVICE_UNAVAILABLE));
|
| + return;
|
| + }
|
| +
|
| + // The other errors are treated as permanent error.
|
| if (source->GetResponseCode() != net::HTTP_OK) {
|
| OnGetTokenFailure(GoogleServiceAuthError(
|
| GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS));
|
|
|