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

Cannot catch exception with useUnifiedTopology

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7.0
    • Affects Version/s: 3.6.0
    • Component/s: None
    • 2
    • Not Needed

      Passing an invalid value for the explain parameter throws an exception.

      However, when useUnifiedTopology is set to true, the exception cannot be caught.

      Tested with mongodb@3.6.9 and MongoDB server version 4.4.7

      Please find attached a minimal example that demonstrates the issue. Note that setting useUnifiedTopology to false lets the application catch/handle the error.

        1. index.js
          0.8 kB
          Kartal Kaan Bozdoğan

            Assignee:
            daria.pardue@mongodb.com Daria Pardue
            Reporter:
            kartalkaan.bozdogan@ocell.io Kartal Kaan Bozdoğan
            Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: