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

Unified Diff: dm/appengine/mutate/finish_attempt.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/finish_attempt.go
diff --git a/dm/appengine/mutate/finish_attempt.go b/dm/appengine/mutate/finish_attempt.go
index 5981749a1778ddc8e28d325be7f2a9a85bd6b52b..ba1ee13012d596690c54b2f967988ec9b33be899 100644
--- a/dm/appengine/mutate/finish_attempt.go
+++ b/dm/appengine/mutate/finish_attempt.go
@@ -8,6 +8,7 @@ import (
"google.golang.org/grpc/codes"
ds "github.com/luci/gae/service/datastore"
+ "github.com/luci/luci-go/common/errors"
"github.com/luci/luci-go/common/logging"
dm "github.com/luci/luci-go/dm/api/service/v1"
"github.com/luci/luci-go/dm/appengine/model"
@@ -54,7 +55,8 @@ func (f *FinishAttempt) RollForward(c context.Context) (muts []tumble.Mutation,
atmpt.Result.Data = &rslt
atmpt.Result.Data.Object = ""
- err = grpcutil.Annotate(ds.Put(c, atmpt, ar), codes.Internal).Reason("during Put").Err()
+ err = errors.Annotate(ds.Put(c, atmpt, ar)).Tag(grpcutil.Tag.With(codes.Internal)).
+ Reason("during Put").Err()
return
}

Powered by Google App Engine
This is Rietveld 408576698