fix: update error message for invalid session to suggest clearing cookies

This commit is contained in:
Abhinav Raut
2025-03-25 02:01:08 +05:30
parent 6ac9f28a32
commit 4b8a954043

View File

@@ -172,7 +172,7 @@ func notAuthPage(handler fastglue.FastRequestHandler) fastglue.FastRequestHandle
user, err := app.auth.ValidateSession(r)
if err != nil {
app.lo.Error("error validating session", "error", err)
return r.SendErrorEnvelope(http.StatusUnauthorized, "Invalid or expired session", nil, envelope.PermissionError)
return r.SendErrorEnvelope(http.StatusUnauthorized, "Invalid or expired session, clear cookies and try again", nil, envelope.PermissionError)
}
if user.ID != 0 {