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

TypeError when transaction is rejected with empty reason

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.6
    • Affects Version/s: 3.5.4
    • Component/s: Lambda
    • Labels:
      None

      Originally reported here

      If a lambda passed to withTransaction results in a rejected promise with no reason, the driver assumes a valid value and tries to check for an error code.

      For example, this will fail:

      const session = await client.startSession()
      await session.withTransaction(s => Promise.reject());
      

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            matt.broadstone@mongodb.com Matt Broadstone
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: