Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-50840

Use 'number' alias in errors when 'number' is specified for $type

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None
    • Query 2020-10-05, Query 2020-10-19

    Description

      Currently, when the validator expression contains {$type: 'number'} (or, equivalently, the $jsonSchema keywords type or bsonType), the 'expectedTypes' field will report the types that are being aliased (i.e. double, long, int, decimal) and not the 'number' alias specified by the user. The error message might be clearer for $type if the 'number' alias is reported under 'expectedTypes' instead.

      Attachments

        Activity

          People

            mihai.andrei@mongodb.com Mihai Andrei
            mihai.andrei@mongodb.com Mihai Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: