-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
I found that duplicate key error (11000) raises a Mongo::Error::OperationFailure. The error object has `code` defined (= 11000) however it does not have `code_name` defined.
It appears code_names are mapped at the driver layer. It would be useful if the Mongo Ruby Driver could:
- Include code name mappings for all error codes which are defined in the MongoDB server specification
- Keep the mapping up-to-date when there are new major server version releases.
(There maybe other similarly mapped fields as well; I haven't looked in detail.)
- is related to
-
SERVER-39706 Include codeName field in writeErrors array
- Backlog
-
SERVER-55582 Expose error code names in mongod responses where mongos does
- Backlog