Skip to content

Users.Info API - Cannot set property 'canViewAllInfo' of undefined #22874

@Fluffy-

Description

@Fluffy-

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:

  • Version of Rocket.Chat Server: 3.16.3 / 3.17
  • Operating System: Linux
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: NA
  • NodeJS Version: NA
  • MongoDB Version: NA

Client Setup Information

  • Desktop App or Browser Version: All / NA
  • Operating System: All / NA

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions