Return wront password error
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user