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

XMLWordPrintableJSON

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

      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
              Reporter:
              Anna Henningsen
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: