-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0
-
Component/s: Error Handling
-
None
The 1.* version was able to provide server-side messages on all write operations. The application was able to rely on those. Now all errors are being replaced with exceptions that is a good improvement. But messages in those exceptions are very generic and cannot be used nor by the application, nor for debugging purposes to resolve the issue.
For example unique index violation on the server side produces the MongoBulkWriteException with the following message "A bulk write operation resulted in one or more errors." - no mentioning of index even...
The other example, client side this time. The use of "." in the BsonElement for the field name (like "name.partial") is prohibitive. But trying to use such will result into the EndOfStreamException with generic message as well.
It would be very helpful if exception messages describe what the issue is, not what the decision is being made by the driver; and server-side messages must be preserved as they are helpful.