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

Some JavaScript syntax errors cause mongosh to report them as mongosh bugs

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

      In mongosh 0.13.1 paste in following malformed javascript code and press enter:

       

      var pipeline = [
       {$bucketAuto": {
         "groupBy": "$favColour",
         "buckets": 2,
       }},
      ];

       

      (missing a double quote " before $bucketAuto)

      mongosh thinks this is its own fault when it isn't and prints out:

      This is an error inside Mongosh. Please file a bug report for the MONGOSH project here: https://jira.mongodb.org.

       

       

            Assignee:
            michael.rose@mongodb.com Michael Rose (Inactive)
            Reporter:
            paul.done@mongodb.com Paul Done
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: