mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 10:54:28 +00:00
return not found when user is nil
This commit is contained in:
@@ -174,6 +174,10 @@ func (s *User) Read(ctx context.Context, req *pb.ReadRequest, rsp *pb.ReadRespon
|
||||
account, err = s.domain.SearchByEmail(ctx, req.Email)
|
||||
}
|
||||
|
||||
if account == nil {
|
||||
return errors.NotFound("user.read", "user not found")
|
||||
}
|
||||
|
||||
rsp.Account = account
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user