Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: common/auth/internal/common.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: copyright Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: common/auth/internal/common.go
diff --git a/common/auth/internal/common.go b/common/auth/internal/common.go
index 45905a767afd5e98d782cbdd004baab36eaed327..f110cb461f18d4f5bf145111f565fda9e0af178f 100644
--- a/common/auth/internal/common.go
+++ b/common/auth/internal/common.go
@@ -18,6 +18,7 @@ import (
"github.com/luci/luci-go/common/clock"
"github.com/luci/luci-go/common/data/rand/mathrand"
"github.com/luci/luci-go/common/errors"
+ "github.com/luci/luci-go/common/retry"
)
// expiryRandInterval is used by TokenExpiresInRnd.
@@ -256,7 +257,7 @@ func grabToken(src oauth2.TokenSource) (*oauth2.Token, error) {
// error a bunch of times is not very bad, so pick safer approach and assume
// any error is transient. Revoked refresh token or bad credentials (most
// common source of fatal errors) is already handled above.
- return nil, errors.WrapTransient(err)
+ return nil, retry.Tag.Apply(err)
default:
return tok, nil
}

Powered by Google App Engine
This is Rietveld 408576698