Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-312

Ensure WriteErrors are returned to the user

      The current OP_REPLY error parsing code does not account for circumstances where the errmsg, codeName, or code are nested within the response document. This means that for write commands (insert, update, and delete), additional error parsing logic is require to extract the writeErrors.

      To fix this problem:

      • Add result.WriteError, result.WriteErrors, and result.WriteConcernError types.
      • Mirror these types in the mongo package as mongo.WriteError, mongo.WriteErrors, mongo.WriteConcernError.
      • Fully implement the result.Delete, result.Insert, and result.Update types to include a result.WriteErrors
      • Make the dispatch methods for Delete, Insert, and Update return an error for for WriteErrors and WriteConcernError
      • Create mongo package errors for WriteErrors and WriteConcernError

            Assignee:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Reporter:
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: