summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2017-10-12 16:37:36 -0400
committerMaria van Keulen <maria@mongodb.com>2017-10-16 12:03:46 -0400
commit51386591ed96fc3070bdaa2652974dadebeaccaf (patch)
tree4cd791ebe503c5add0a419a6e353f1f45061d44b /src
parent10ec4b3108fcd522bec98862c0587cdf4adf80c6 (diff)
downloadmongo-51386591ed96fc3070bdaa2652974dadebeaccaf.tar.gz
SERVER-31182 Clarify parse error for invalidly typed findCmd arguments
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/query/query_request.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/db/query/query_request.cpp b/src/mongo/db/query/query_request.cpp
index ec2da22eb65..074bf7511fa 100644
--- a/src/mongo/db/query/query_request.cpp
+++ b/src/mongo/db/query/query_request.cpp
@@ -140,10 +140,10 @@ StatusWith<unique_ptr<QueryRequest>> QueryRequest::parseFromFindCommand(unique_p
BSONElement el = it.next();
const auto fieldName = el.fieldNameStringData();
if (fieldName == kFindCommandName) {
- // Check both String and UUID types for "find" field.
- Status status = checkFieldType(el, String);
+ // Check both UUID and String types for "find" field.
+ Status status = checkFieldType(el, BinData);
if (!status.isOK()) {
- status = checkFieldType(el, BinData);
+ status = checkFieldType(el, String);
}
if (!status.isOK()) {
return status;