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

Unified Diff: common/auth/internal/service.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: common/auth/internal/service.go
diff --git a/common/auth/internal/service.go b/common/auth/internal/service.go
index 7b1724dd85328f6bd74d88f86ad81154b17084cc..c166fd7f423db03ef25d09a8afc07460588a613b 100644
--- a/common/auth/internal/service.go
+++ b/common/auth/internal/service.go
@@ -15,8 +15,8 @@ import (
"golang.org/x/oauth2/google"
"golang.org/x/oauth2/jwt"
- "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
+ "github.com/luci/luci-go/common/retry/transient"
)
type serviceAccountTokenProvider struct {
@@ -87,7 +87,7 @@ func (p *serviceAccountTokenProvider) MintToken(ctx context.Context, base *oauth
switch newTok, err := grabToken(cfg.TokenSource(ctx)); {
case err == nil:
return newTok, nil
- case errors.IsTransient(err):
+ case transient.Tag.In(err):
logging.Warningf(ctx, "Error when creating access token - %s", err)
return nil, err
default:

Powered by Google App Engine
This is Rietveld 408576698