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

Unified Diff: server/auth/openid/cookie.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: server/auth/openid/cookie.go
diff --git a/server/auth/openid/cookie.go b/server/auth/openid/cookie.go
index b17d5a23a2cdd480f8da003f75380cf07d2eec9c..c69269ac687974c5a749450669388f9a4f9f0bc3 100644
--- a/server/auth/openid/cookie.go
+++ b/server/auth/openid/cookie.go
@@ -9,8 +9,8 @@ import (
"time"
"github.com/luci/luci-go/common/clock"
- "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/tokens"
"golang.org/x/net/context"
)
@@ -57,7 +57,7 @@ func decodeSessionCookie(c context.Context, r *http.Request) (string, error) {
}
payload, err := sessionCookieToken.Validate(c, cookie.Value, nil)
switch {
- case errors.IsTransient(err):
+ case transient.Tag.In(err):
return "", err
case err != nil:
logging.Warningf(c, "Failed to decode session cookie %q: %s", cookie.Value, err)

Powered by Google App Engine
This is Rietveld 408576698