Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-3592

createEncryptedCollection should raise a specialized exception to report the intermediate encryptedFields

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.4
    • Affects Version/s: None
    • Component/s: Client Side Encryption
    • None

      createEncryptedCollection (PYTHON-3357) should raise a specialized exception to report the intermediate encryptedFields similar to Java's MongoUpdatedEncryptedFieldsException.getEncryptedFields api:

      /**
       * The {@code encryptedFields} document that allows inferring which data keys are <strong>known to be created</strong>
       * before {@code this} exception happened. Creation of a data key includes persisting it in the key vault.</p>
       * <p>
       * Note that the returned {@code encryptedFields} document is not guaranteed to contain information about all the data keys that
       * were created, only about those that the driver is certain about. For example, if persisting a data key times out,
       * the driver does not know whether it can be considered created or not, and does not include the information about the key in
       * the {@code encryptedFields} document. You can analyze whether the {@linkplain #getCause() cause} is a definite or indefinite
       * error, and rely on the returned {@code encryptedFields} to be containing information on all created keys
       * only if the error is definite.</p>
       *
       * @return The updated {@code encryptedFields} document.
       */
      public BsonDocument getEncryptedFields()
      

            Assignee:
            julius.park@mongodb.com Julius Park (Inactive)
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: