-
Type:
Improvement
-
Resolution: Done
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 2.0, 2.0.1
-
Component/s: API
-
None
-
None
-
Major Change
-
None
-
None
-
None
-
None
-
None
-
None
The implementation of the InsertOneAsync is not consistent with its documentation. The method signature of InsertOneAsync is listed as Task InsertOneAsync(..., and the documentation (both in the code and online) states:
Return Value Type: Task The result of the insert operation.
This is inconsistent with the previous version of the API as well as with the original mongo api, which both return a WriteResult (see this section of the tutorial). The importance of the WriteResult is that it includes an error message that can be logged to help diagnose the issue. With just the Task, there is not enough information to help determine why the insert had failed.