@@ -42,17 +42,24 @@ returns an error of the `WriteError <{+core-api+}/WriteError.html>`__ type.
4242
4343The ``WriteError`` type contains the following methods:
4444
45- - `getCode <{+core-api+}/WriteError.html#getCode()>`__ : returns the code associated with this error.
46- - `getMessage <{+core-api+}/WriteError.html#getMessage()>`__ : returns the message associated with this error.
47- - `getDetails <{+core-api+}/WriteError.html#getDetails()>`__ : returns a BSON Document with details associated with this
48- error, which may be empty.
49- - `getCategory <{+core-api+}/WriteError.html#getCategory()>`__ : returns the category of the write error as an
50- `ErrorCategory <{+core-api+}/ErrorCategory.html>`__ object.
45+ - `` getCode`` : returns the code associated with this error
46+ - `` getMessage`` : returns the message associated with this error
47+ - `` getDetails`` : returns a BSON Document with details associated with this
48+ error, which may be empty
49+ - `` getCategory`` : returns the category of the write error as an
50+ `ErrorCategory <{+core-api+}/ErrorCategory.html>`__ object
5151
5252The `BulkWriteError <{+core-api+}/bulk/BulkWriteError.html>`__ type extends
53- ``WriteError`` and inherits the above methods. The `WriteConcernError
54- <{+core-api+}/bulk/WriteConcernError.html>`__ is not related to the
55- ``WriteError`` type and details errors relating to the write concern.
53+ ``WriteError`` and inherits the above methods. This type is used for bulk
54+ operations and includes an ``index`` field that identifies the item in the bulk
55+ operation that led to the error.
56+
57+ The `WriteConcernError <{+core-api+}/bulk/WriteConcernError.html>`__ is not
58+ related to the ``WriteError`` type and details errors relating to the write
59+ concern. In addition to the ``getCode``, ``getMessage``, and ``getDetails``
60+ methods, ``WriteConcernError`` has the ``getCodeName`` method, which returns the
61+ name associated with the error code. This type does not have the ``getCategory``
62+ method.
5663
5764Write Error
5865~~~~~~~~~~~
0 commit comments