Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6649

should aggregate shell helper throw on error?

    XMLWordPrintable

Details

    • Question
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.3.2
    • Aggregation Framework
    • None
    • Minor Change

    Description

      Some shell helpers throw when a server error is encountered (eg find, group, mapReduce). The aggregate shell helper does not, instead returning a document with ok:0.

      Test

      t = db.t;
      t.drop();
       
      // Invalid matcher syntax.
      printjson( t.aggregate( { $match:{ a:{ $mod:[ 0 /* invalid */, 0 ] } } } ) );

      Result

      { "errmsg" : "exception: mod can't be 0", "code" : 10073, "ok" : 0 }

      Attachments

        Issue Links

          Activity

            People

              mathias@mongodb.com Mathias Stearn
              aaron Aaron Staple
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: