[SERVER-11366] improve new update() error strings Created: 24/Oct/13 Updated: 11/Jul/16 Resolved: 04/Dec/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Write Ops |
| Affects Version/s: | 2.5.3 |
| Fix Version/s: | 2.5.5 |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | David Storch | Assignee: | Scott Hernandez (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | 26qa | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Description |
There should be a space before _id and the field name should be quoted, as shown below:
Further error string improvements are described in the comments. |
| Comments |
| Comment by Githook User [ 04/Dec/13 ] | |||||||||||
|
Author: {u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}Message: | |||||||||||
| Comment by Amalia Hawkins [ 28/Oct/13 ] | |||||||||||
|
Can we standardize the error message that occurs when multiple positional operators are found? Right now, in $pullAll (and basically everywhere else) we have:
but for $pop it's slightly different:
Suggest changing $pop to match the rest. | |||||||||||
| Comment by David Storch [ 28/Oct/13 ] | |||||||||||
|
1)
This should read "The argument to $each in $addToSet must be an array but it was of type NumberDouble". 2)
This should read "The argument to $each in $push must be an array but it was of type NumberDouble". 3)
I think we should improve this error string by removing the final "not an array" part, i.e. it should just be "$pushAll requires an array of values but was given an embedded document." | |||||||||||
| Comment by David Storch [ 25/Oct/13 ] | |||||||||||
|
An error string related to the positional operator that could use improvement:
For some modifiers, such as $inc, the "matched field not provided string" was changed to "The positional operator did not find the match...". The old error string still exists, however, for $pull and $set:
| |||||||||||
| Comment by David Storch [ 25/Oct/13 ] | |||||||||||
|
A few more of the error messages added here are missing single quotes when reporting field names, not just the $unset case above: |