Skip to content

Conversation

@AbhishekPanta8
Copy link

The duplicate key error in the collection was not handled so handled it.

Summary

added if condition check inside catch statement.

Motivation

Fixes uncaught dup key with caracal @ develop #140

Testing

Tested manually

Questions

@birm birm changed the base branch from master to develop March 31, 2023 05:48
return res;
} catch (e) {
if (silent) {
if (e.code === 11000) {
Copy link
Member

Choose a reason for hiding this comment

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

We should probably only silently return if 'silent' is true

Copy link
Author

Choose a reason for hiding this comment

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

Yes true, I have handled that case in else if statement.

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