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

Cannot catch exception with useUnifiedTopology

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 3.6.0
    • Fix Version/s: 3.7.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      2
    • Documentation Changes:
      Not Needed

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              daria.pardue Daria Pardue
              Reporter:
              kartalkaan.bozdogan@ocell.io Kartal Kaan Bozdoğan
              Implementer:
              Eric Adum Eric Adum (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: