-
Type: Task
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Component/s: Client Side Encryption
-
None
-
Needed
Summary
The createCollection helper should throw an error if the `encryptedFields.fields` argument is not an array.
Drivers with type systems that prevent this error do not need to make changes.
Motivation
If the `encryptedFields.fields` argument is not an array, the server will throw an error. However, the `ecc`, `esoc` and `esc` collections will already have been created. Subsequient calls to `createCollection` will fail because `ecc`, `esoc` and `esc` exist, even when the user provides the correct options.
We should fail with an error before creating any collections so we don't put a user's database into an inconsistent state.
Who is the affected end user?
QE users.
How does this affect the end user?
Annoyance, potential confusion when subsequent createCollection attempts fail even with valid arguments.
How likely is it that this problem or use case will occur?
Unsure.
If the problem does occur, what are the consequences and how severe are they?
Annoyance, potential confusion when subsequent createCollection attempts fail even with valid arguments.
Is this issue urgent?
No.
Is this ticket required by a downstream team?
No.
Is this ticket only for tests?
No.