Implement accessor for error labels on exception classes

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Fixed
    • Priority: Critical - P2
    • 1.6.0alpha1, 1.6.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      CDRIVER-2558 introduced a mongoc_error_has_label() function, which can be used to inspect any bson_t reply returned by its API. This covers queries, commands, and write operations.

      We should provide access to these labels so that users can make decisions about error handling (e.g. retrying transactions due to an error with the "TransientTransactionError" label). Since these labels can be set by both the server or libmongoc (for client errors such as dropped connections), this new API likely belongs on the RuntimeException class. We should confirm that it's not relevant to LogicException or its sub-classes.

            Assignee:
            Derick Rethans
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: