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(model): avoid unhandled error if createIndex() throws a sync error #14995

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

vkarpov15
Copy link
Collaborator

Summary

If collection.createIndex() happens to throw a sync error (as opposed to returning a promise that rejects), we end up with an unhandled error. Long term, I think what we should do is refactor to use async/await, but this fix should be enough for now.

Examples

@vkarpov15 vkarpov15 added this to the 8.8 milestone Oct 29, 2024
@vkarpov15 vkarpov15 merged commit 8e4411d into master Oct 29, 2024
58 checks passed
@vkarpov15 vkarpov15 deleted the vkarpov15/createindex-sync-error branch October 29, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant