Skip to content

Commit

Permalink
fix(handler/sessionrefresh): handle not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
tronghn committed Oct 4, 2023
1 parent c1bdb90 commit a2e939f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2e939f

Please sign in to comment.