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

Protocol parse errors are always uncaught with useUnifiedTopology

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.7, 4.0.0
    • Affects Version/s: 4.0.0, 3.6.5
    • Component/s: None
    • Labels:
    • Not Needed

      In one shell, run: while true; do echo garbage | nc -l 27017; done

      In another, connect with:

      require('mongodb').MongoClient.connect('mongodb://localhost/', { useUnifiedTopology: true })
      

      (for the 4.0 driver, leave out the option)

      The resulting MongoParseError will always be uncaught, instead of rejecting the Promise returned by .connect() (which is what happens without using unified topology, and which is the expected behavior here).

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: