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

Unified Diff: tokenserver/appengine/impl/machinetoken/machinetoken.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: tokenserver/appengine/impl/machinetoken/machinetoken.go
diff --git a/tokenserver/appengine/impl/machinetoken/machinetoken.go b/tokenserver/appengine/impl/machinetoken/machinetoken.go
index c43095aeeb0a1bdbde7dc241b15b6f930b698ec9..f0b1ae363b48f0068e3ce86e690a0356c0e5a3bb 100644
--- a/tokenserver/appengine/impl/machinetoken/machinetoken.go
+++ b/tokenserver/appengine/impl/machinetoken/machinetoken.go
@@ -18,7 +18,7 @@ import (
"golang.org/x/net/context"
"github.com/luci/luci-go/common/clock"
- "github.com/luci/luci-go/common/errors"
+ "github.com/luci/luci-go/common/retry/transient"
"github.com/luci/luci-go/server/auth/signing"
"github.com/luci/luci-go/tokenserver/api"
@@ -126,7 +126,7 @@ func Mint(c context.Context, params *MintParams) (*tokenserver.MachineTokenBody,
srvInfo, err := params.Signer.ServiceInfo(c)
if err != nil {
- return nil, "", errors.WrapTransient(err)
+ return nil, "", transient.Tag.Apply(err)
}
body := &tokenserver.MachineTokenBody{

Powered by Google App Engine
This is Rietveld 408576698