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

ObjectId() Error message needs to be updated

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.1
    • Affects Version/s: 0.15.5
    • Component/s: CRUD
    • None
    • Iteration Wolverhampton, Iteration Xochimilco
    • Not Needed

      Problem Statement/Rationale

       MONGOSH-865  added support for integer parameters in ObjectId(). The BSON Type error message for a bad parameter  doesn't include integers

      Steps to Reproduce

      Enter:

      x = ObjectId("badParameterValue")

      Expected Results

      Something like:

      BSONTypeError: Argument passed in must be a string of 12 bytes, a string of 24 hex characters, or an integer.

      Actual Results

      BSONTypeError: Argument passed in must be a string of 12 bytes or a string of 24 hex characters

      Additional Notes

      None.

            Assignee:
            leonardo.rossi@mongodb.com Leonardo Rossi (Inactive)
            Reporter:
            dave.cuthbert@mongodb.com Dave Cuthbert (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: