Mark update command as failed if there are write concern errors
This commit is contained in:
parent
6fe3cd982d
commit
692cdb94c7
1 changed files with 1 additions and 1 deletions
|
@ -677,7 +677,7 @@ updateBlock ordered col (prevCount, docs) = do
|
||||||
let writeErrors = map docToWriteError $ fromMaybe [] (doc !? "writeErrors")
|
let writeErrors = map docToWriteError $ fromMaybe [] (doc !? "writeErrors")
|
||||||
let upsertedDocs = fromMaybe [] (doc !? "upserted")
|
let upsertedDocs = fromMaybe [] (doc !? "upserted")
|
||||||
return $ UpdateResult
|
return $ UpdateResult
|
||||||
((not $ true1 "ok" doc) || (length writeErrors > 0))
|
((not $ true1 "ok" doc) || (not $ null writeErrors) || (not $ null writeConcernErrors))
|
||||||
(at "n" doc)
|
(at "n" doc)
|
||||||
(at "nModified" doc)
|
(at "nModified" doc)
|
||||||
(map docToUpserted upsertedDocs)
|
(map docToUpserted upsertedDocs)
|
||||||
|
|
Loading…
Reference in a new issue