[SERVER-58772] improve error message for top level $not expression Created: 22/Jul/21 Updated: 29/Oct/23 Resolved: 21/Oct/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 5.0.1 |
| Fix Version/s: | 5.2.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Matt Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng, quick-tech-debt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | QO 2021-11-01 | ||||||||
| Participants: | |||||||||
| Description |
|
In 4.4 and earlier, the error message for top level `$not` was: "errmsg" : "unknown top level operator: $not" Unfortunately in 5.0 it became possibly more confusing: "unknown top level operator: $not. If you have a field name that starts with a '$' symbol, consider using $getField or $setField." I propose we special case the error when $not is used as top level operator to instead add: |
| Comments |
| Comment by Githook User [ 20/Oct/21 ] |
|
Author: {'name': 'Matt Boros', 'email': 'matt.boros@mongodb.com'}Message: |
| Comment by Joe Kanaan [ 29/Jul/21 ] |
|
Even if SERVER-1454 is implemented, we could look into doing this for the 5.0 branch |