From a2e939f7162f326111e737095b7054ffc18561e4 Mon Sep 17 00:00:00 2001 From: Trong Huu Nguyen Date: Wed, 4 Oct 2023 09:39:36 +0200 Subject: [PATCH] fix(handler/sessionrefresh): handle not found error --- pkg/handler/handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/handler/handler.go b/pkg/handler/handler.go index 5c142f84..ec7e9669 100644 --- a/pkg/handler/handler.go +++ b/pkg/handler/handler.go @@ -361,7 +361,7 @@ func (s *Standalone) SessionRefresh(w http.ResponseWriter, r *http.Request) { sess, err = s.SessionManager.Refresh(r, sess) if err != nil { - if errors.Is(err, session.ErrInvalidExternal) || errors.Is(err, session.ErrInvalid) { + if errors.Is(err, session.ErrInvalidExternal) || errors.Is(err, session.ErrInvalid) || errors.Is(err, session.ErrNotFound) { logger.Infof("session/refresh: refreshing: %+v", err) w.WriteHeader(http.StatusUnauthorized) return