-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
Labels:None
-
Fully Compatible
-
Query 2018-03-12, Query 2018-03-26
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.
- is documented by
-
DOCS-11528 Docs for SERVER-33757: Treat an illegal target type in $convert as an "onError" case
- Closed