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

Unified Diff: dm/appengine/mutate/add_deps.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/mutate/add_deps.go
diff --git a/dm/appengine/mutate/add_deps.go b/dm/appengine/mutate/add_deps.go
index 219688125ce6aea663b03faaebbb87b89d4f2f94..0645ffa03e3d28b568ec25c095f140eec7fcb669 100644
--- a/dm/appengine/mutate/add_deps.go
+++ b/dm/appengine/mutate/add_deps.go
@@ -7,6 +7,7 @@ package mutate
import (
ds "github.com/luci/gae/service/datastore"
"github.com/luci/luci-go/common/data/bit_field"
+ "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/dm/api/service/v1"
"github.com/luci/luci-go/dm/appengine/model"
@@ -50,7 +51,8 @@ func (a *AddDeps) RollForward(c context.Context) (muts []tumble.Mutation, err er
}
fwdDeps, err := filterExisting(c, model.FwdDepsFromList(c, a.Auth.Id.AttemptID(), a.Deps))
- err = grpcutil.Annotate(err, codes.Internal).Reason("while filtering deps").Err()
+ err = errors.Annotate(err).Tag(grpcutil.Tag.With(codes.Internal)).
+ Reason("while filtering deps").Err()
if err != nil || len(fwdDeps) == 0 {
return
}
@@ -64,7 +66,8 @@ func (a *AddDeps) RollForward(c context.Context) (muts []tumble.Mutation, err er
}
if err = ds.Put(c, fwdDeps, atmpt, ex); err != nil {
- err = grpcutil.Annotate(err, codes.Internal).Reason("putting stuff").Err()
+ err = errors.Annotate(err).Tag(grpcutil.Tag.With(codes.Internal)).
+ Reason("putting stuff").Err()
return
}

Powered by Google App Engine
This is Rietveld 408576698