Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1222

Implement accessor for error labels on exception classes

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Critical - P2 Critical - P2
    • 1.6.0alpha1, 1.6.0
    • Affects Version/s: None
    • Component/s: 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 Derick Rethans
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: