Skip to content

Commit 6ea4cc5

Browse files
committed
fix: handle login error after transaction
1 parent c54742f commit 6ea4cc5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/users/usecase/login_users.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ func (us *usecase) Login(ctx context.Context, userReq domain.Login) (user domain
1616
}
1717
return nil
1818
})
19+
if err != nil {
20+
logrus.Error("us.Login: failed to login. ", err)
21+
return
22+
}
1923

2024
if err = bcrypt.CompareHashAndPassword([]byte(user.Password), []byte(userReq.Password)); err != nil {
2125
logrus.Error("us.Login: invalid password")

0 commit comments

Comments
 (0)