Skip to content

Commit 51090d9

Browse files
committed
stop spamming slack when a user login expires
1 parent f2bdda3 commit 51090d9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

router.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,11 @@ func authenticate(store *datastore.Datastore, fn http.HandlerFunc, authMethod st
160160
// check for a logged in user. We always check this incase we need it
161161
loggedInUser, err := security.New(req, store).LoggedInUser()
162162
if err != nil {
163-
logrus.Error("Something wrong with Auth", err)
163+
if err.Error() == "redis: nil" {
164+
// ignore it, its expired from cache
165+
} else {
166+
logrus.Error("Something wrong with Auth", err)
167+
}
164168
}
165169
if loggedInUser != nil && loggedInUser.TableName == tableName { // we are in the correct section of the website
166170
fn(w, req)

0 commit comments

Comments
 (0)