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

Unified Diff: tumble/service.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
« grpc/grpcutil/errors.go ('K') | « tumble/process.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tumble/service.go
diff --git a/tumble/service.go b/tumble/service.go
index 187351ff8cc5841ec269b2674c7b9173fdd91157..8acdb4e77edc5db2b40fc70376562eb94a09600e 100644
--- a/tumble/service.go
+++ b/tumble/service.go
@@ -15,6 +15,7 @@ import (
"github.com/luci/luci-go/appengine/gaemiddleware"
"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/common/sync/parallel"
"github.com/luci/luci-go/server/router"
@@ -225,7 +226,7 @@ func (s *Service) ProcessShardHandler(ctx *router.Context, loop bool) {
if err != nil {
logging.Errorf(c, "failure! %s", err)
- if errors.IsTransient(err) {
+ if transient.Tag.In(err) {
rw.Header().Add(transientHTTPHeader, "true")
}
rw.WriteHeader(http.StatusInternalServerError)
« grpc/grpcutil/errors.go ('K') | « tumble/process.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698