summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
authorKatherine Wu <katherine.wu@mongodb.com>2020-05-14 13:47:20 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-01 18:22:44 +0000
commit60124ec2ef0acf2e6747d620779cc40c9376c9b6 (patch)
treea10a17464aafb1a30ca0d0594df1bda938ce67d6 /src/mongo/db/pipeline
parentc7f527dfff3c1cf475896255d47750077a3416a4 (diff)
downloadmongo-60124ec2ef0acf2e6747d620779cc40c9376c9b6.tar.gz
SERVER-46625 Improve diagnostics when mongocryptd requests are sent to non-mongocryptd daemon
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/aggregation_request.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/aggregation_request.cpp b/src/mongo/db/pipeline/aggregation_request.cpp
index 71eddc792d1..b75fb66a055 100644
--- a/src/mongo/db/pipeline/aggregation_request.cpp
+++ b/src/mongo/db/pipeline/aggregation_request.cpp
@@ -226,6 +226,10 @@ StatusWith<AggregationRequest> AggregationRequest::parseFromBSON(
<< typeName(elem.type())};
}
request.setIsMapReduceCommand(elem.boolean());
+ } else if (isMongocryptdArgument(fieldName)) {
+ return {ErrorCodes::FailedToParse,
+ str::stream() << "unrecognized field '" << elem.fieldName()
+ << "'. This command may be meant for a mongocryptd process."};
} else if (!isGenericArgument(fieldName)) {
return {ErrorCodes::FailedToParse,
str::stream() << "unrecognized field '" << elem.fieldName() << "'"};