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)) |
+} |