-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
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.