-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 0.0.2
-
Component/s: CRUD
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
- causes
-
GODRIVER-307 Insert methods do not seem propogate duplicate key errors
- Closed
-
GODRIVER-347 Write errors are not handled for command responses
- Closed