Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-3107

Add error code_name for all known errors

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Unknown 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:

      1. Include code name mappings for all error codes which are defined in the MongoDB server specification
      2. 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.)

            Assignee:
            alex.bevilacqua@mongodb.com Alex Bevilacqua
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: