-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Empty show more show less
-
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.
- is duplicated by
-
NODE-2035 Exceptions thrown from awaited cursor.forEach iterator do not propagate
- Closed
- related to
-
MONGOSH-703 Throwing exceptions from cursor.map() callback crashes the shell
- Closed