Return wront password error

This commit is contained in:
2026-06-10 16:20:11 +02:00
parent eba7e59555
commit 41fe337a49

View File

@@ -31,6 +31,8 @@ func (a *PublicAccountService) SignIn(ctx context.Context, in *accounts.SignInRe
if err != nil {
if errors.Is(err, services.ErrUserNotFound) {
return nil, status.Error(codes.NotFound, "User not found")
} else if errors.Is(err, services.ErrWrongPassword) {
return nil, status.Error(codes.Unauthenticated, "Wrong password")
}
return nil, status.Error(codes.Aborted, "Couldn't create a user")
}