Handle unsupported option "readConcern" in new url parser

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • next
    • Affects Version/s: None
    • Component/s: Core, Native
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Unlike the legacy uri parser, the spec-compliant uri parser does not filter out unsupported options from the uri string. In a particular case, users can specify the invalid option readConcern (should be readConcernLevel), and unintentionally overwrite our internal representation of a readConcern, leading to failed reads.

      We should come up with a way to ensure this does not happen. Options include:

      1. console.warn when users do this. If we get a readConcern in the parsed options, we warn them that it’s not a supported option, and tell users to use readConcernLevel instead
      2. try to run JSON.parse on the passed-in readConcern, and if it passes + returns an object, use it. otherwise, assume user meant readConcernLevel
      3. Treat readConcern as readConcernLevel, with readConcernLevel taking precedence.

              Assignee:
              Katherine Walker (Inactive)
              Reporter:
              Daniel Aprahamian (Inactive)
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: