Implement the ServerError interface for ClientBulkWriteException

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Bulk API, Error Handling
    • 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

      Context

      ClientBulkWriteException does not implement the full ServerError interface. As a result, errors.As(err, &serverErr) returns false for a client bulk write error, and the idiomatic server-error detection path. Its unclear why there wouldn't be parity with BulkWriteEception.

      Definition of done

      • Implement ServerError interface for ClientBulkWriteException
      • Update documentation for IsDuplicateKeyError, IsNetworkError, and IsTimeout to indicate that false is an indefinite result, which doesn't necessarily indicate that an error is not caused by that. Only true is a definite result.

      Pitfalls

      No obvious pitfalls.

            Assignee:
            Unassigned
            Reporter:
            Preston Vasquez
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: