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:
79
79
.. code-block:: none
80
80
:copyable: false
81
81
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{{}}}
85
85
86
86
In the preceding error message, the ``message`` field describes the reason for
87
87
the error, and the ``details`` field provides specific details about the failing
88
88
operation. To address this error, you must revise the document to have a unique
89
89
``ObjectId``.
90
90
91
+ If you run the ``getCategory`` method on this ``WriteError`` object, it would
92
+ return an ``ErrorCategory`` of ``DUPLICATE_KEY``.
93
+
91
94
Bulk Write Error
92
95
----------------
93
96
You can’t perform that action at this time.
0 commit comments