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

Unified Diff: tokenserver/appengine/impl/utils/revocation/id.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/utils/revocation/id.go
diff --git a/tokenserver/appengine/impl/utils/revocation/id.go b/tokenserver/appengine/impl/utils/revocation/id.go
index 8e2a3db3d2ee59875d5a770edb395b4388405267..ac8b06db9442a232c90e4d70a0770614ed148611 100644
--- a/tokenserver/appengine/impl/utils/revocation/id.go
+++ b/tokenserver/appengine/impl/utils/revocation/id.go
@@ -8,7 +8,7 @@ import (
"golang.org/x/net/context"
"github.com/luci/gae/service/datastore"
- "github.com/luci/luci-go/common/errors"
+ "github.com/luci/luci-go/common/retry/transient"
)
// GenerateTokenID produces an int64 that can be used as a token identifier.
@@ -24,7 +24,7 @@ func GenerateTokenID(c context.Context, kind string) (int64, error) {
datastore.NewKey(c, kind, "", 0, nil),
}
if err := datastore.AllocateIDs(c, keys); err != nil {
- return 0, errors.WrapTransient(err)
+ return 0, transient.Tag.Apply(err)
}
return keys[0].IntID(), nil
}

Powered by Google App Engine
This is Rietveld 408576698