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

Check function's BSON options

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: Needs Triage
    • Component/s: Usability
    • None
    • ALL

      Calls to functions that take options should check those options and error when something unsupported is an option. This can help with typos, for instance "unique" vs "unqiue" on ensureIndex.

      Additionally values for options should be checked. For instance with dropDups there is no error when 1 is used instead of true, instead it silently doesn't drop them. If that is a design flaw, then if 2 is used an error should be returned because the output is out of the bounded range (the range [true, false] however they are represented).

            Assignee:
            Unassigned Unassigned
            Reporter:
            charlie.page@10gen.com Charlie Page
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: