Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NODE-2035): Exceptions thrown from awaited cursor forEach do not propagate #2852

Conversation

W-A-James
Copy link
Contributor

@W-A-James W-A-James commented Jun 17, 2021

Description

Catch and propagate exceptions in awaited cursor.forEach
What changed?

  • lib/cursor.js
  • test/functional/cursor.test.js

@W-A-James W-A-James requested a review from nbbeeken June 17, 2021 21:29
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent job translating the async/await to promises, one small chainable section missed in the afterEach

test/functional/cursor.test.js Outdated Show resolved Hide resolved
@W-A-James W-A-James requested a review from nbbeeken June 21, 2021 14:17
@emadum emadum self-requested a review June 21, 2021 14:32
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nbbeeken nbbeeken requested review from dariakp and durran June 21, 2021 15:07
@nbbeeken nbbeeken added the Team Review Needs review from team label Jun 21, 2021
Copy link
Contributor

@emadum emadum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

test/functional/cursor.test.js Outdated Show resolved Hide resolved
@W-A-James W-A-James requested a review from dariakp June 23, 2021 15:17
@nbbeeken nbbeeken merged commit a917dfa into 3.6 Jun 24, 2021
@nbbeeken nbbeeken deleted the NODE-2035/3.6/Exceptions-thrown-from-awaited-cursor-forEach-do-not-propagate branch June 24, 2021 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
4 participants