Details
-
Bug
-
Resolution: Fixed
-
Unknown
-
None
-
None
-
None
Description
If I create an index like so:
iv := db.Collection("foo", options.Collection().SetWriteConcern(writeconcern.New(writeconcern.W(0)))).Indexes() |
_, err := iv.CreateOne(context.TODO(), mongo.IndexModel{Keys: bson.D{{Key: "user_id", Value: 1}}}) |
I get back the error go.mongodb.org/mongo-driver/x/mongo/driver.ErrUnacknowledgedWrite. This should presumably be mongo.ErrUnacknowledgedWrite! Other operations that return this call processWriteErr() to transform it, but it's missing from IndexView.CreateMany().