-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Error Handling
-
None
I'm filing this on behalf of HADOOP-214.
The message for a BulkWriteException includes a list of addresses of BulkWriteErrors. This ticket suggests that the message should instead include the BulkWriteError message instead of the object's address, i.e.
com.mongodb.BulkWriteException: Bulk write operation error on server localhost:27017. Write errors: [com.mongodb.BulkWriteError@4056e6bc]
could become
com.mongodb.BulkWriteException: Bulk write operation error on server localhost:27017. Write errors: [BulkWriteError{index=0, code=11000, message='E11000 duplicate key error index: tagcloud.entitonstmp.$_id_ dup key: { : "duplicated_id" }', details={ }}]
I can also see how this might be intentional; if the BulkWriteException has 1000 BulkWriteErrors, then printing the message for all of them would be overly verbose. However, you could also print the first 3 (or some other number) messages and just note that there are 997 more BulkWriteErrors.
- duplicates
-
JAVA-2267 Fix BulkWriteException's message
- Closed