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

Unified Diff: dm/appengine/deps/util.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/util.go
diff --git a/dm/appengine/deps/util.go b/dm/appengine/deps/util.go
new file mode 100644
index 0000000000000000000000000000000000000000..30d6fbdbcaf7cb596bf19f0aa0ba64bb64eb48c9
--- /dev/null
+++ b/dm/appengine/deps/util.go
@@ -0,0 +1,15 @@
+// Copyright 2017 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package deps
+
+import (
+ "github.com/luci/luci-go/common/errors"
+ "github.com/luci/luci-go/grpc/grpcutil"
+ "google.golang.org/grpc/codes"
+)
+
+func grpcAnnotate(err error, code codes.Code) *errors.Annotator {
+ return errors.Annotate(err).Tag(grpcutil.Tag.With(code))
+}

Powered by Google App Engine
This is Rietveld 408576698