We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5634939 commit 107cda0Copy full SHA for 107cda0
document-store/src/main/java/org/hypertrace/core/documentstore/mongo/MongoCollection.java
@@ -560,7 +560,7 @@ public Optional<Document> update(
560
throws IOException {
561
try {
562
return updateExecutor.update(query, updates, updateOptions);
563
- } catch (final MongoWriteException e) {
+ } catch (final MongoCommandException | MongoWriteException e) {
564
if (e.getCode() == MONGODB_DUPLICATE_KEY_ERROR_CODE) {
565
throw new DuplicateDocumentException();
566
}
0 commit comments