-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: 8.2.0-rc0
-
Component/s: None
-
None
-
Catalog and Routing
-
ALL
The error message returned by an incorrectly-typed encrypted field passed to collection creation contains the incorrect command name.
This Python code:
self.client_encryption.create_encrypted_collection( database=self.db, name="testing1", encrypted_fields={ "fields": [{"path": "ssn", "bsonType": "string", "keyId": False}] }, kms_provider="local", )
should produce this error:
{'ok': 0.0, 'errmsg': "BSON field 'create.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData'", 'code': 14, 'codeName': 'TypeMismatch', ...}
but produces this error instead:
{'ok': 0.0, 'errmsg': "BSON field 'checkAuthForCreateCollection.encryptedFields.fields.keyId' is the wrong type 'bool', expected type 'binData'", 'code': 14, 'codeName': 'TypeMismatch', ...}
The expected `create` command name is replaced by `checkAuthForCreateCollection`.
Possibly caused by SERVER-100936?
- is duplicated by
-
PYTHON-5198 test_encryption.TestAutomaticDecryptionKeys.test_03_invalid_keyid incorrect regex error
-
- Closed
-
- related to
-
SERVER-100936 Mongos must return WCE as a top-level error for create collection
-
- Open
-