Treat an illegal target type in $convert as an "onError" case

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.7.4
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • Query 2018-03-12, Query 2018-03-26
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, an illegal target type (e.g., "minKey") results in a query failure, even if there is an "onError" value. This means that attempting to pass the return value of a $type expression as the "to" parameter can result in a failure.

      With this change, an invalid target type will instead return the "onError" value when it is present. Note that a string or number that does not map to any type will still result in an error in all cases.

            Assignee:
            Justin Seyster
            Reporter:
            Justin Seyster
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: