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

Unified Diff: appengine/gaeauth/client/client.go

Issue 2951393002: [errors] de-specialize Transient in favor of Tags. (Closed)
Patch Set: more refactor 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: appengine/gaeauth/client/client.go
diff --git a/appengine/gaeauth/client/client.go b/appengine/gaeauth/client/client.go
index b9213b1b05381b56d95cf428848c94fc31a182f5..2a116e3fd6b0a0c917748fab536550e3075465e5 100644
--- a/appengine/gaeauth/client/client.go
+++ b/appengine/gaeauth/client/client.go
@@ -22,8 +22,8 @@ import (
"github.com/luci/luci-go/common/data/caching/proccache"
"github.com/luci/luci-go/common/data/rand/mathrand"
"github.com/luci/luci-go/common/data/stringset"
- "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
+ "github.com/luci/luci-go/common/retry/transient"
)
// GetAccessToken returns an OAuth access token representing app's service
@@ -49,7 +49,7 @@ func GetAccessToken(c context.Context, scopes []string) (*oauth2.Token, error) {
logging.Debugf(c, "Getting an access token for scopes %q", strings.Join(scopes, ", "))
accessToken, exp, err := info.AccessToken(c, scopes...)
if err != nil {
- return nil, errors.WrapTransient(err)
+ return nil, transient.Tag.Apply(err)
}
logging.Debugf(c, "The token expires in %s", exp.Sub(clock.Now(c)))

Powered by Google App Engine
This is Rietveld 408576698