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

mongo: In async wrappers, catch exceptions and reject #12469

Merged
merged 1 commit into from Jan 24, 2023

Conversation

ebroder
Copy link
Contributor

@ebroder ebroder commented Jan 23, 2023

Previously, if an exception was thrown in an async method, it would not be caught, which is unusual in an async method. Instead, catch the exception and return it as a rejected promise.

Previously, if an exception was thrown in an async method, it would not
be caught, which is unusual in an async method. Instead, catch the
exception and return it as a rejected promise.
Copy link
Contributor

@Grubba27 Grubba27 left a comment

Choose a reason for hiding this comment

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

LGTM! But I would ask @radekmie his opinions on it

@Grubba27 Grubba27 changed the base branch from devel to release-2.11 January 24, 2023 17:49
@Grubba27 Grubba27 merged commit c88cba2 into meteor:release-2.11 Jan 24, 2023
@Grubba27 Grubba27 mentioned this pull request Jan 24, 2023
@ebroder ebroder deleted the reject-async branch January 25, 2023 21:44
Copy link
Collaborator

@radekmie radekmie left a comment

Choose a reason for hiding this comment

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

Sorry for the late review. This change is fine, but it'd be simpler to remove the Promise.resolve and make these async - it'd have the same effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants