TypeError when transaction is rejected with empty reason

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.5.6
    • Affects Version/s: 3.5.4
    • Component/s: Lambda
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
              Reporter:
              Matt Broadstone
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: