-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: Error Handling
-
None
-
Fully Compatible
-
Not Needed
Currently the com.mongodb.bulk.WriteConcernError contains a Set<String property for error labels, based on a faulty assumption (based on our spec tests) that the writeConcernError document in the server response contains errorLabels, when in fact they are included as a field in the top-level response document. This has led to bugs, the known ones having been fixed in JAVA-4419, and some confusing code. Let's deprecate com.mongodb.bulk.WriteConcernError#errorLabels to start the process of getting rid of this.
Eventually we will also want to do the following:
- Consolidate errorLabel handing in MongoWriteConcernException, since currently they are added by the code that constructs MongoWriteConcernException. This will require a new constructor for that exception, and the others can be deprecated.
- Refactor code that creates instances of com.mongodb.bulk.WriteConcernError to stop relying on the errorLabels property
- is related to
-
JAVA-5153 Remove deprecated methods in WriteConcernError class
- Closed
- links to