feat: improve error message in GetFailedSigninConfigByUser()

This commit is contained in:
Yang Luo
2024-08-10 09:31:46 +08:00
parent 45e25acc80
commit b4e51b4631
3 changed files with 3 additions and 2 deletions

View File

@ -52,6 +52,9 @@ func GetFailedSigninConfigByUser(user *User) (int, int, error) {
if err != nil {
return 0, 0, err
}
if application == nil {
return 0, 0, fmt.Errorf("the application for user %s is not found", user.GetId())
}
failedSigninLimit := application.FailedSigninLimit
if failedSigninLimit == 0 {