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: dm/appengine/deps/auth.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: dm/appengine/deps/auth.go
diff --git a/dm/appengine/deps/auth.go b/dm/appengine/deps/auth.go
index 3dc9264c9d13bdd922ffa2678583d069285673b9..4aca54a9bdad552901323ea02063d7d1b230617c 100644
--- a/dm/appengine/deps/auth.go
+++ b/dm/appengine/deps/auth.go
@@ -7,6 +7,7 @@ package deps
import (
"github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
+ "github.com/luci/luci-go/common/retry/transient"
"github.com/luci/luci-go/dm/api/acls"
"github.com/luci/luci-go/grpc/grpcutil"
"github.com/luci/luci-go/luci_config/server/cfgclient"
@@ -23,7 +24,7 @@ func loadAcls(c context.Context) (ret *acls.Acls, err error) {
ret = &acls.Acls{}
if err := cfgclient.Get(c, cfgclient.AsService, cSet, file, textproto.Message(ret), nil); err != nil {
- return nil, errors.Annotate(err).Transient().
+ return nil, errors.Annotate(err).Tag(transient.Tag).
D("cSet", cSet).D("file", file).InternalReason("loading config").Err()
}
return
@@ -33,7 +34,7 @@ func inGroups(c context.Context, groups []string) error {
for _, grp := range groups {
ok, err := auth.IsMember(c, grp)
if err != nil {
- return grpcutil.Annotate(err, codes.Internal).Reason("failed group check").Err()
+ return grpcAnnotate(err, codes.Internal).Reason("failed group check").Err()
}
if ok {
return nil

Powered by Google App Engine
This is Rietveld 408576698