diff --git a/edgraph/access_ee.go b/edgraph/access_ee.go index b82de85b57b..c4f1ed1bfc6 100644 --- a/edgraph/access_ee.go +++ b/edgraph/access_ee.go @@ -138,7 +138,7 @@ func (s *Server) authenticateLogin(ctx context.Context, request *api.LoginReques if user == nil { return nil, errors.Errorf("unable to authenticate through refresh token: "+ - "user not found for id %v", userId) + "invalid username or password") } glog.Infof("Authenticated user %s through refresh token", userId) @@ -155,10 +155,10 @@ func (s *Server) authenticateLogin(ctx context.Context, request *api.LoginReques if user == nil { return nil, errors.Errorf("unable to authenticate through password: "+ - "user not found for id %v", request.Userid) + "invalid username or passowrd") } if !user.PasswordMatch { - return nil, errors.Errorf("password mismatch for user: %v", request.Userid) + return nil, x.ErrorInvalidLogin } return user, nil }