-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Bulk API, Error Handling
Context
ClientBulkWriteException does not implement the full ServerError interface. As a result, errors.As(err, &serverErr) returns false for a client bulk write error, and the idiomatic server-error detection path. Its unclear why there wouldn't be parity with BulkWriteEception.
Definition of done
- Implement ServerError interface for ClientBulkWriteException
- Update documentation for IsDuplicateKeyError, IsNetworkError, and IsTimeout to indicate that false is an indefinite result, which doesn't necessarily indicate that an error is not caused by that. Only true is a definite result.
Pitfalls
No obvious pitfalls.
- fixes
-
GODRIVER-4009 IsDuplicateKeyError doesn’t work with ClientBulkWriteException
-
- Closed
-
- is duplicated by
-
GODRIVER-4009 IsDuplicateKeyError doesn’t work with ClientBulkWriteException
-
- Closed
-
- related to
-
GODRIVER-3832 mongo.ErrorCodes() returns empty with mongo.ClientBulkWriteException
-
- Closed
-
-
GODRIVER-2388 Improved Bulk Write API
-
- Development Complete
-