Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-913

process crashes when certain connection string parameters are specified.

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 3.0.0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      ```MongoClient.connect('mongodb://localhost/db?maxIdleTimeMS=100', (err) => {})``` will crash the running process.

      "maxIdleTimeMS" is unsupported, but instead of just shutting down the process, it should probably emit a warning and dismiss the unsupported parameter, or try...catch and call the callback function with the error as first parameter.

      The ```parse``` function throws in ```url_parser.js:234```.
      The caller is ```mongo_client:289```

      So my suggestion is :

      • Emit a warning and ignore the parameter
      • try...catch the call to that function in mongo_client.

            Assignee:
            jessica.lord Jessica Lord
            Reporter:
            kamagatos Mohamed Kamagate
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: