mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +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)
|
account, err = s.domain.SearchByEmail(ctx, req.Email)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if account == nil {
|
||||||
|
return errors.NotFound("user.read", "user not found")
|
||||||
|
}
|
||||||
|
|
||||||
rsp.Account = account
|
rsp.Account = account
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|||||||
Reference in New Issue
Block a user