1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-11-04 08:17:24 -05:00

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 <art27@cantab.net>
This commit is contained in:
zeripath 2021-06-23 22:41:39 +01:00 committed by GitHub
parent b223d36195
commit 5f2ef17fdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -856,7 +856,11 @@ func UserSignIn(username, password string) (*User, error) {
return authUser, nil return authUser, nil
} }
log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) if IsErrUserNotExist(err) {
log.Debug("Failed to login '%s' via '%s': %v", username, source.Name, err)
} else {
log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err)
}
} }
return nil, ErrUserNotExist{user.ID, user.Name, 0} return nil, ErrUserNotExist{user.ID, user.Name, 0}