diff --git a/mongo_connector/doc_managers/mongo_doc_manager.py b/mongo_connector/doc_managers/mongo_doc_manager.py index 2918a733..6dcd58fd 100644 --- a/mongo_connector/doc_managers/mongo_doc_manager.py +++ b/mongo_connector/doc_managers/mongo_doc_manager.py @@ -239,8 +239,10 @@ def iterate_chunks(): LOG.warn('Continuing after DuplicateKeyError: ' + str(e)) except pymongo.errors.BulkWriteError as bwe: - LOG.error(bwe.details) - raise e + for writeError in bwe.details['writeErrors']: + if writeError['code'] != 11000: + raise bwe + pass @wrap_exceptions def remove(self, document_id, namespace, timestamp):