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
Allow-deny package does not parse MongoServerError #13121
Comments
Sageyuva
added a commit
to Sageyuva/meteor
that referenced
this issue
May 4, 2024
…d for inserting data into a MongoDB collection
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm writing about an issue when performing insert/update operations using minimongo. This issue is triggered when the collection has a unique index and the insert/update will fail (could also be triggered in other circumstances that we are not aware of).
npm-mongo
version4.0.0
was introduced, MongoError was translated into more specific error (see this PR). Since then,npm-mongo
will not throwMongoError
but some variation (for exampleMongoServerError
)How to reproduce
Exception while invoking method '/test/insert' MongoServerError: E11000 duplicate key error collection: meteor.test index: name_1 dup key: { name: "test" }
I think the issue comes from this
catch
block in the functionCollectionPrototype._defineMutationMethods
(allow-deny.js
):Best regards,
Sebastian
The text was updated successfully, but these errors were encountered: