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

Stage names in error message should match name used

    • Fully Compatible
    • ALL
    • Query 2019-07-15, Query 2019-07-29

      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).

            Assignee:
            george.wangensteen@mongodb.com George Wangensteen
            Reporter:
            asya.kamsky@mongodb.com Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: