Index: scheduler/appengine/frontend/handler.go |
diff --git a/scheduler/appengine/frontend/handler.go b/scheduler/appengine/frontend/handler.go |
index c7c0da090d50df0b27443249a750d6060f6cea5d..104130d661a5721d9b4b4e421a14f3a650801a6c 100644 |
--- a/scheduler/appengine/frontend/handler.go |
+++ b/scheduler/appengine/frontend/handler.go |
@@ -35,8 +35,8 @@ import ( |
"github.com/luci/luci-go/appengine/gaemiddleware" |
"github.com/luci/luci-go/common/data/rand/mathrand" |
- "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/scheduler/api/scheduler/v1" |
@@ -85,7 +85,7 @@ func (c *requestContext) fail(code int, msg string, args ...interface{}) { |
// retrying the task. |
func (c *requestContext) err(e error, msg string, args ...interface{}) { |
code := 500 |
- if !errors.IsTransient(e) { |
+ if !transient.Tag.In(e) { |
code = 202 |
} |
args = append(args, e) |
@@ -253,7 +253,7 @@ func readConfigCron(c *router.Context) { |
}) |
} |
if err = tq.Add(rc.Context, "read-project-config", tasks...); err != nil { |
- rc.err(errors.WrapTransient(err), "Failed to add tasks to task queue") |
+ rc.err(transient.Tag.Apply(err), "Failed to add tasks to task queue") |
} else { |
rc.ok() |
} |