[JAVA-4922] Error Code from WriteError not propagated to MongoServerException (3.12.x line) Created: 04/Apr/23 Updated: 06/Apr/23 Resolved: 05/Apr/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | 3.12.9 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Unknown |
| Reporter: | Gavin Line | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
||||||||||||
| Description |
SummaryThe 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 ReproduceAny operation that throws a MongoWriteException (duplicate key for one) will throw an exception that does not contain the error code for the exception. Additional BackgroundIt looks like this was introduced on the 4.x line and was closed as part of |
| Comments |
| Comment by Jeffrey Yemin [ 05/Apr/23 ] |
|
Closing as a duplicate of Normally we would not release a patch for the 3.12 driver three years after 4.0 was released, but we will consider an exception to that practice for this issue, as we kind of messed up by not backporting |
| Comment by Jeffrey Yemin [ 05/Apr/23 ] |
|
This seems to have been caused by the backport of JAVA-3993 to the 3.12.x branch, and released in 3.12.9. But the subsequent change of |