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

Unified Diff: grpc/prpc/server.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: grpc/prpc/server.go
diff --git a/grpc/prpc/server.go b/grpc/prpc/server.go
index 96b570ed57fe8a761925eaa3b6ba697123ccaee6..3bded3862f2f77d42c6edc7b4c93462b7275dd0f 100644
--- a/grpc/prpc/server.go
+++ b/grpc/prpc/server.go
@@ -15,8 +15,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
- "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/server/router"
)
@@ -119,7 +119,7 @@ func (s *Server) authenticate() router.Middleware {
return func(c *router.Context, next router.Handler) {
switch ctx, err := a.Authenticate(c.Context, c.Request); {
- case errors.IsTransient(err):
+ case transient.Tag.In(err):
res := errResponse(codes.Internal, http.StatusInternalServerError, escapeFmt(err.Error()))
res.write(c.Context, c.Writer)
case err != nil:

Powered by Google App Engine
This is Rietveld 408576698