[SERVER-12546] Misleading error message "Invalid modifier specified: $set" Created: 30/Jan/14 Updated: 30/Jan/14 Resolved: 30/Jan/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Dan Dascalescu | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
The error message Invalid modifier specified: $set, at a first glance, suggests that '$set' itself is an invalid modifier. I'm not the only one to read it that way; see also this StackOverflow comment. This happens when (accidentally) running an update() with {$set: null}. The message would be less misleading and more useful if it output the precise value of the modifier (not just $set). For example: Invalid modifier specified for $set: null |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 30/Jan/14 ] | ||||
|
In the current code this is no longer the message. Instead you get this;
This will be avaiable with the 2.5.3+ dev releases and in the 2.6 stable production release when it comes out. If you think this message is not what you want, please make a comment and we can re-open this. |