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

Stage names in error message should match name used

    XMLWordPrintable

    Details

    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Query 2019-07-15, Query 2019-07-29

      Description

      db.example.update({_id:1}, [     {$set:{ } } ])
      WriteResult({ ...
         "writeError" : {
      	"code" : 40177,
      	"errmsg" : "Invalid $addFields :: caused by :: specification must have at least one field"
      	}
      })
      

      Typing $set and getting an error for $addFields can be confusing. Would be cleaner to use the same stage name as user provided (especially when it's a one-to-one alias).

        Attachments

          Activity

            People

            Assignee:
            george.wangensteen George Wangensteen
            Reporter:
            asya Asya Kamsky
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: