Skip to content

Conversation

@vkarpov15
Copy link
Collaborator

Fix #14572

Summary

Right now we have a throwOnValidationError that means bulkWrite() and insertMany() will throw if any operations fail validation... except if all operations fail validation. This PR makes it so that we still throw a MongooseBulkWriteError if all operations fail validation.

Examples

vkarpov15 added a commit that referenced this pull request May 16, 2024
…g MongooseBulkWriteError if all valid operations succeed in bulkWrite() and insertMany()

Backport #13410
Backport #14587
Fix #14572
@vkarpov15 vkarpov15 added this to the 8.4 milestone May 17, 2024
@vkarpov15 vkarpov15 merged commit cdedde6 into master May 17, 2024
@hasezoey hasezoey deleted the vkarpov15/gh-14572 branch May 17, 2024 11:37
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.

bulkWrite does not throw an error if all documents are invalid (ordered: false)

3 participants