File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -79,15 +79,18 @@ error message:
7979.. code-block:: none
8080 :copyable: false
8181
82- WriteError{code=11000, message='E11000 duplicate key error
83- collection: testDB.testCollection index: _id_ dup key: { _id: 1 }',
84- details=Document{{}}}
82+ WriteError{code=11000, message='E11000 duplicate key error
83+ collection: testDB.testCollection index: _id_ dup key: { _id: 1 }',
84+ details=Document{{}}}
8585
8686In the preceding error message, the ``message`` field describes the reason for
8787the error, and the ``details`` field provides specific details about the failing
8888operation. To address this error, you must revise the document to have a unique
8989``ObjectId``.
9090
91+ If you run the ``getCategory`` method on this ``WriteError`` object, it would
92+ return an ``ErrorCategory`` of ``DUPLICATE_KEY``.
93+
9194Bulk Write Error
9295----------------
9396
You can’t perform that action at this time.
0 commit comments