Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-1574

Driver fails on missing errmsg in write concern error

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.5.0
    • Affects Version/s: None
    • Component/s: None

      It is possible for the server to give us back a write concern error (and probably also a non-write concern error) without the errmsg field set. Per pavithra.vetriselvan@mongodb.com, it's an optional field.

      However, the driver expects it to always be present, and errors if it receives such an error without this field. I discovered this doing a POC of the test in https://github.com/mongodb/specifications/pull/1367/files where the failpoint sets an error with no errmsg.

      To better guard against any issues with this and to ensure we can pass the test added in DRIVERS-2468, we should update our Serde logic to default all errmsg values to an empty string if they are not present in the server reply.

            Assignee:
            abraham.egnor@mongodb.com Abraham Egnor
            Reporter:
            kaitlin.mahar@mongodb.com Kaitlin Mahar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: