diff options
author | Maria van Keulen <maria@mongodb.com> | 2017-10-12 16:37:36 -0400 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2017-10-16 12:03:46 -0400 |
commit | 51386591ed96fc3070bdaa2652974dadebeaccaf (patch) | |
tree | 4cd791ebe503c5add0a419a6e353f1f45061d44b /src | |
parent | 10ec4b3108fcd522bec98862c0587cdf4adf80c6 (diff) | |
download | mongo-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.cpp | 6 |
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; |