Should at least have field name and duplicated value.
E11000 (duplicate key error) should return a list of duplicate keys and _ids in insert, bulk insert, and continue_on_error inserts.
Voted on this, but thought I should write something too.
The message for error 11000 currently at least be parsed to extract the index name. The message for error 11001 doesn't contain even that information.
Having index name along with the name of the field and it's value as separate fields in a result document for both errors would be very welcome for run-time and post-mortem (log-based) debugging.
We have a number of collections with multiple unique indexes that could be violated. It looks like our only option to differentiate which index was violated in the event of an E11000 is to parse the error message, which works but is a hacky solution to what I would imagine is not an uncommon problem. This feature would be very much appreciated. Thanks!