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

Error message truncated for db.collection.insertOne()

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 0.13.1
    • Affects Version/s: None
    • Component/s: CLI Module
    • None
    • Not Needed

      Problem Description

      The error message for db.collection.insertOne() is truncated

      Steps to Reproduce

      Create a collection 

      db.fixIndex.drop()
      db.fixIndex.insertMany(
      [
      { _id: 1, a: 1, b: 1, c: ["a1", "b1"] },
      { _id: 2, a: ["a2", "b2"], b: 2, c: ["a2", "b2"] },
      { _id: 3, a: "a3", b: ["b3, c3"], c: ["a3", "b3"] }
      ]
      )

      db.fixIndex.createIndex( {a:1, b:1} )

       

      1. Add a document that violates index constraints
        db.fixIndex.insertOne( { _id: 7, a: ["a7", "b7"], b: ["b7, c7"], c: ["a7", "b7"] } )

        Expected Results

      Full error message explaining the problem (see screen shots).

      Actual Results

      Error message is truncated

      Additional Notes

        1. Screen Shot 2021-04-09 at 2.10.00 PM.png
          68 kB
          Dave Cuthbert
        2. Screen Shot 2021-04-09 at 2.10.25 PM.png
          14 kB
          Dave Cuthbert

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

              Created:
              Updated:
              Resolved: