Skip to content

Commit 5f2ef17

Browse files
authored
Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238)
Instead log these at debug - with warn logging for other errors. Fix #16235 Signed-off-by: Andrew Thornton <[email protected]>
1 parent b223d36 commit 5f2ef17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

models/login_source.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,11 @@ func UserSignIn(username, password string) (*User, error) {
856856
return authUser, nil
857857
}
858858

859-
log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err)
859+
if IsErrUserNotExist(err) {
860+
log.Debug("Failed to login '%s' via '%s': %v", username, source.Name, err)
861+
} else {
862+
log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err)
863+
}
860864
}
861865

862866
return nil, ErrUserNotExist{user.ID, user.Name, 0}

0 commit comments

Comments
 (0)