Skip to content

Commit cf8a7f1

Browse files
asdf
1 parent c4df623 commit cf8a7f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

addon/mongocrypt.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ Value MongoCrypt::MakeExplicitEncryptionContext(const CallbackInfo& info) {
627627
std::unique_ptr<mongocrypt_binary_t, MongoCryptBinaryDeleter> binaryValue(
628628
Uint8ArrayToBinary(valueBuffer));
629629

630+
if (!options.Has("expressionMode") || !options.Get("expressionMode").IsBoolean()) {
631+
throw TypeError::New(Env(), "`rangeOptions` must be provided if `algorithm` is set to Range");
632+
}
630633
const bool isExpressionMode = options.Get("expressionMode").ToBoolean();
631634

632635
const bool status =

0 commit comments

Comments
 (0)