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

Switch order of checkFieldType calls for find command collection identifier arguments

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

      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.vankeulen@mongodb.com Maria van Keulen
            Reporter:
            maria.vankeulen@mongodb.com Maria van Keulen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: