Skip to content

Fixed uncaught dup key with caracal @ develop #140#154

Open
AbhishekPanta8 wants to merge 1 commit into
camicroscope:developfrom
AbhishekPanta8:dupKeyFix
Open

Fixed uncaught dup key with caracal @ develop #140#154
AbhishekPanta8 wants to merge 1 commit into
camicroscope:developfrom
AbhishekPanta8:dupKeyFix

Conversation

@AbhishekPanta8

Copy link
Copy Markdown

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
Comment thread service/database/index.js
return res;
} catch (e) {
if (silent) {
if (e.code === 11000) {

Copy link
Copy Markdown
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
Copy Markdown
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