Skip to content
This repository was archived by the owner on Dec 23, 2021. It is now read-only.

Commit 896ec02

Browse files
committed
Address issues that arose from merging #77
1 parent f7d5e7d commit 896ec02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MongoDB/Driver/WriteResult.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Object hippo_write_result_init(bson_t *reply, bson_error_t *error, mongoc_client
182182
}
183183

184184
if (success == 0) {
185-
if (error->domain == MONGOC_ERROR_COMMAND || error->domain == MONGOC_ERROR_WRITE_CONCERN) {
185+
if ((error->domain == MONGOC_ERROR_COMMAND && error->code != MONGOC_ERROR_COMMAND_INVALID_ARG) || error->domain == MONGOC_ERROR_WRITE_CONCERN) {
186186
auto bw_exception = MongoDriver::Utils::throwBulkWriteException(error->message);
187187
bw_exception->o_set(s_MongoDriverExceptionBulkWriteException_writeResult, obj, MongoDriver::s_MongoDriverExceptionBulkWriteException_className);
188188

0 commit comments

Comments
 (0)