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

Error::Parser fails to correctly handle writeErrors

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • 2.6.2
    • 2.7.0.rc0, 2.6.4
    • None
    • None
    • Debian Jessie / macOS Mojave

    Description

      Insertion of a document with a duplicate key returns a WriteResult such as:

      {WriteResult({ "nInserted" : 0, "writeError" : { "code" : 11000, "errmsg" : "E11000 duplicate key error collection: aragorn_development.foo index: id dup key: { : ObjectId('5bda11fdf3b189195ebb0f3a') }" }}

       

      The Error::Parser#122 (parse_code) handles nested error codes for write concern errors, but not writeErrors. The resulting OperationFailure lacks a numeric error code (e.g., 11000).

      Attachments

        Issue Links

          Activity

            People

              oleg.pudeyev@mongodb.com Oleg Pudeyev
              brendandixon Brendan Dixon
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: