mongo.ErrorCodes() returns empty with mongo.ClientBulkWriteException

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Trivial - P5
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Go Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Detailed steps to reproduce the problem?

      • Use Client.BulkWrite to do an insert.
      • Repeat that operation so that it causes a dupe-key error.
      • fmt.Printf("%v", mongo.ErrorCodes(bulkErr))

      OBSERVE: No error codes are printed.
      EXPECTED: Should see a dupe-key error.

      Definition of done: what must be done to consider the task complete?

      The above should work as it does with WriteException and BulkWriteException.

      The exact Go version used, with patch level:

      1.25.7

      The exact version of the Go driver used:

      2.5.0

      Describe how MongoDB is set up. Local vs Hosted, version, topology, load balanced, etc.

      n/a

      The operating system and version (e.g. Windows 7, OSX 10.8, ...)

      macOS

      Security Vulnerabilities

      n/a

            Assignee:
            Unassigned
            Reporter:
            Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: