Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-712

Serverless Private Beta: missing close square bracket in error message

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial - P5
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: No version
    • Component/s: CLI Module
    • Labels:
      None
    • Documentation Changes:
      Not Needed

      Description

      Enterprise [mongos]> db.system.users.find()
      Uncaught MongoError: user is not allowed to do action [find] on [admin.system.users
      

      I'm guessing this is a sanitised version of a raw error message and the end square bracket has just been stripped out.

      This also appears using mongosh against an M0 cluster

      Enterprise atlas-plzu8u-shard-0 [primary]> db.system.users.find()
      Uncaught MongoError: user is not allowed to do action [find] on [local.system.users
      

      But is fine with the legacy shell due to the more standard error format

      MongoDB Enterprise atlas-plzu8u-shard-0:PRIMARY> db.system.users.find()
      Error: error: {
      	"ok" : 0,
      	"errmsg" : "user is not allowed to do action [find] on [myFirstDatabase.system.users]",
      	"code" : 8000,
      	"codeName" : "AtlasError"
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              joanna.cheng Joanna Cheng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: