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

cursor.forEach() iterator exception does not result in rejected Promise

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Not Needed

      When an iterator function is passed to `cursor.forEach()` that throws an exception, that leads to an uncaught exception that tears down the whole Node.js process. It would seem like a better choice to use the returned Promise/the provided callback to forward the error back to the caller.

            Assignee:
            Unassigned Unassigned
            Reporter:
            anna.henningsen@mongodb.com Anna Henningsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: