-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: CRUD
-
None
Currently, the Go driver returns mongo.ErrUnacknowledgedWrite for any write operation performed with an unacknowledged write concern. That makes handling errors difficult because you have to explicitly check for and discard mongo.ErrUnacknowledgedWrite. Instead, we should just return a nil result and a nil error if everything worked (i.e. if there were no observed errors).
Definition of done:
- Remove mongo.ErrUnacknowledgedWrite.
- Add an Acknowledged bool to all write result types (e.g. InsertOneResult, BulkWriteResult, etc) to indicate whether or not the result information is from an unacknowledged write.