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 for #134 #135

Merged
merged 1 commit into from
Aug 6, 2018
Merged

Fix for #134 #135

merged 1 commit into from
Aug 6, 2018

Conversation

oneeman
Copy link

@oneeman oneeman commented Jul 10, 2018

Fixes #134

Fix error handling for Meteor 1.7.

Meteor 1.7 uses v3 of the Mongo driver, which changes
the errors thrown by bulk operations. Meteor uses .insert()
rather than .insertOne(), so is affected. As a result, with
Meteor 1.7, the error's name is BulkWriteError, not MongoError.

This commit makes the check compatible with both v2 and v3 of the
Mongo driver, by checking just the error code, not the name.

Meteor 1.7 uses v3 of the Mongo driver, which changes
the errors thrown by bulk operations.  Meteor uses .insert()
rather than .insertOne(), so is affected.  As a result, with
Meteor 1.7, the error's name is BulkWriteError, not MongoError.

This commit makes the check compatible with both v2 and v3 of the
Mongo driver, by checking just the error code, not the name.
@TheGame2500 TheGame2500 merged commit 687e9ea into percolatestudio:master Aug 6, 2018
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.

2 participants