-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Users.Info API - Cannot set property 'canViewAllInfo' of undefined #22874
Comments
Fixes RocketChat#22874 We're getting an error ( Cannot set property 'canViewAllInfo' of undefined ) when calling the /api/v1/users.info endpoint when searching for a user that does not exist. Cannot set property 'canViewAllInfo' of undefined users.info
James 👋 Thanks for reporting this! As for the PR, I'll take a look at it soon. If everything checks out, I'll talk to our engineering manager 🙂 |
Hi I totally forgot about this. Just looked at the PR and looks good. I'll talk to one of our engineers and see when we can get it merged. Thanks Fluffy :) |
Update: we're currently on freeze. The PR can be merged after 3.18 is released :) |
@Fluffy- Thanks for reporting! |
Description:
We're getting an error when calling the users.info api when searching for a user that does not exist:
" Cannot set property 'canViewAllInfo' of undefined "
Steps to reproduce:
Call /api/v1/users.info and pass-in username that does not exist
Expected behavior:
Expecting "User not found." response. (as found in older RC versions)
Actual behavior:
Receive the following json response:
{
"success":false,
"error":"Cannot set property 'canViewAllInfo' of undefined"
}
Server Setup Information:
Client Setup Information
Additional context
NA
Relevant logs:
API ➔ debug get users.info threw an error: TypeError: Cannot set property 'canViewAllInfo' of undefined at getFullUserDataByIdOrUsername (app/lib/server/functions/getFullUserData.js:95:2) at Object.get (app/api/server/v1/users.js:197:16) at app/api/server/api.js:394:82 at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12) at Object._internalRouteActionHandler [as action] (app/api/server/api.js:394:39) at Route.share.Route.Route._callEndpoint (packages/nimble_restivus/lib/route.coffee:150:32) at packages/nimble_restivus/lib/route.coffee:59:33 at packages/simple_json-routes.js:98:9
The text was updated successfully, but these errors were encountered: