improve error message for top level $not expression

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.2.0
    • Affects Version/s: 5.0.1
    • Component/s: None
    • Fully Compatible
    • QO 2021-11-01
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      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:
      "unknown top level operator: $not. If you are trying to negate entire expression use $nor

            Assignee:
            Matt Boros
            Reporter:
            Asya Kamsky
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: