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

mongosh no longer printing out validation errors

    • Type: Icon: Bug Bug
    • Resolution: Gone away
    • Priority: Icon: Major - P3 Major - P3
    • No version
    • Affects Version/s: 1.1.1
    • Component/s: Embedded Shell
    • None
    • Not Needed

      Problem Statement/Rationale

      When a document fails validation with MongoDB 5.0+, the server returns information on where the problem is. mongosh used to print out that information and now it no longer does.

      Steps to Reproduce

       Connect to a MongoDB 5.0+

      db.createCollection('testval', {validator: {$jsonSchema: { required: ['foo'] }}})
      db.testval.insertOne({bar: 123})
      

       

       

      Expected Results

      The shell tells me where the validation error is like it used to

      Actual Results

      MongoServerError: Document failed validation

      Additional Notes

      Any additional information that may be useful to include.

            Assignee:
            Unassigned Unassigned
            Reporter:
            massimiliano.marcon@mongodb.com Massimiliano Marcon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: