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

group $keyf function error should be passed to the client

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • JavaScript, MapReduce
    • None

    Description

      Doing a group with an invalid key function (such as 'function(doc) { return

      {"x" : 1}

      ', which is missing a '}') gives this in the log:

      conn1 Wed Jul 7 10:06:45 JS Error: SyntaxError: missing } in compound statement nofile_b:0
      conn1 Wed Jul 7 10:06:45 compile failed for: function(doc) { return

      {"x" : 1}

      conn1 Wed Jul 7 10:06:45 end connection 127.0.0.1:57423

      But it doesn't pass any sort of error back to the client, leading to confusing results.

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            kristina Kristina Chodorow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: