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

connection is not checked for null before .isCompatible() is called

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.8
    • Affects Version/s: 1.4.8
    • Component/s: None
    • Environment:
      nodejs v10

      In rare situation when a connection may be null we get this stack

      TypeError: Cannot call method 'isCompatible' of null

        • [out :: ] at __executeInsertCommand (/home/codez/node_modules/harmony/node_modules/mongodb-mapper/node_modules/mongodb/lib/mongodb/db.js:1868:18)

      https://github.com/mongodb/node-mongodb-native/blob/master/lib/mongodb/db.js#L1868

      connection is check to be null later in the __executeInsertCommand function.
      That check should move up.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            barshow@dropbox.com David Barshow
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: