move other errors to utils package

This commit is contained in:
Nicola Murino
2021-06-19 13:06:01 +02:00
parent f19937b715
commit c1b862394d
13 changed files with 79 additions and 73 deletions

View File

@@ -845,7 +845,7 @@ func updateLoginMetrics(user *dataprovider.User, ip, method string, err error) {
// record failed login key auth only once for session if the
// authentication fails in checkAuthError
event := common.HostEventLoginFailed
if _, ok := err.(*dataprovider.RecordNotFoundError); ok {
if _, ok := err.(*utils.RecordNotFoundError); ok {
event = common.HostEventUserNotFound
}
common.AddDefenderEvent(ip, event)