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

Dont use MultipleErrorsOccurred path if all errors are the same

    • Fully Compatible
    • Sharding 2019-02-11

      It would be better to just return the common error

      {
              "REQUEST" : {
                      "op" : "update",
                      "args" : {
                              "updates" : [
                                      {
                                              "q" : {
                                                      "_id" : ObjectId("530fadb98e0e468e10a335f7"),
                                                      "x" : {
                                                              "$xyz" : 1
                                                      }
                                              },
                                              "u" : {
                                                      "a" : 1
                                              }
                                      }
                              ]
                      }
              },
              "RESPONSE" : {
                      "ok" : 1,
                      "nModified" : 0,
                      "n" : 0,
                      "writeErrors" : [
                              {
                                      "index" : 0,
                                      "code" : 65,
                                      "errInfo" : {
                                              "causedBy" : [
                                                      {
                                                              "index" : 0,
                                                              "code" : 2,
                                                              "errmsg" : "unknown operator: $xyz"
                                                      },
                                                      {
                                                              "index" : 0,
                                                              "code" : 2,
                                                              "errmsg" : "unknown operator: $xyz"
                                                      }
                                              ]
                                      },
                                      "errmsg" : "multiple errors for op : unknown operator: $xyz :: and :: unknown operator: $xyz"
                              }
                      ]
              }
      }
      

            Assignee:
            janna.golden@mongodb.com Janna Golden
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: