-
Type:
Bug
-
Resolution: Duplicate
-
Priority:
Critical - P2
-
None
-
Affects Version/s: 2.2
-
Component/s: Error Handling
-
None
-
Environment:Windows
-
None
-
Minor Change
-
None
-
None
-
None
-
None
-
None
-
None
When calling InsertOneAsync with a duplicate key, you get a MongoWriteException. By digging into the WriteError and looking at the code you can determine what the actual failure is, but this behavior is different from something like ReplaceOneAsync which thrown a DuplicateKeyException.
- duplicates
-
CSHARP-1236 Non-unique key error handling
-
- Closed
-