Switch order of checkFieldType calls for find command collection identifier arguments

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Minor - P4
    • 3.6.0-rc1
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Fully Compatible
    • Storage 2017-10-23
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As part of the commit for SERVER-27991, which allows specifying a UUID instead of a collection name as the collection identifier for a find command, we check for both types when examining the collection identifier argument. Presently, if one fails to provide a find command with either a string or a BinData UUID, this results in the following error:

      Failed to parse: find: 1.0. 'find' field must be of BSON type binData.

      The order of the checkFieldType calls should be switched so the error that gets output when neither a UUID nor a collection name is specified says that BSON type "String" was expected.

            Assignee:
            Maria van Keulen
            Reporter:
            Maria van Keulen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: