Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-464

driver does not properly recognize certain command errors

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.9.0
    • Affects Version/s: None
    • Component/s: API
    • None

      when calling a command, driver checks for error using the "err" field.
      But that field is not always specified, sometimes it's "errmsg".
      Apparently there is a known distinction between the 2.

      For example, when using an unknown "w" policy:
      { "serverUsed" : "localhost:27017" , "n" : 0 , "lastOp" :

      { "$ts" : 1319852070 , "$inc" : 1}

      , "connectionId" : 82 , "errmsg" : "exception: unrecognized getLastError mode: blah" , "code" : 14830 , "ok" : 0.0} in 3ms

      looks like driver should instead rely on ok=0 and then look for either err or errmsg.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            antoine Antoine Girbal
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: