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

Serverless Private Beta: missing close square bracket in error message

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Trivial - P5 Trivial - P5
    • No version
    • Affects Version/s: None
    • Component/s: CLI Module
    • None
    • Not Needed

      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"
      }
      

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

              Created:
              Updated:
              Resolved: