Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4922

Error Code from WriteError not propagated to MongoServerException (3.12.x line)

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: 3.12.9
    • Component/s: None
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            m9nrgeur0x9d@blurme.net Gavin Line
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: