-
Type: Bug
-
Resolution: Duplicate
-
Priority: Unknown
-
None
-
Affects Version/s: 3.12.9
-
Component/s: None
-
None
Summary
The MongoWriteException doesn't propagate down the error code to the MongoServerException which causes it to use the default value. This is a regression as it looks like version 3.12.8 does not have the same problem.
How to Reproduce
Any operation that throws a MongoWriteException (duplicate key for one) will throw an exception that does not contain the error code for the exception.
Additional Background
It looks like this was introduced on the 4.x line and was closed as part of JAVA-4219. Through the following PR.
- duplicates
-
JAVA-4219 Error Code from WriteError not propagated to MongoServerException
- Closed