Change error code.

This commit is contained in:
Harpreet Sangar 2024-01-05 12:25:18 +05:30
parent 0726c17804
commit 08af7beb3f

View File

@ -1819,7 +1819,7 @@ Option<nlohmann::json> Collection::search(std::string raw_query,
for(const auto& expanded_search_field: expanded_search_fields) {
if (search_schema.count(expanded_search_field) == 0) {
return Option<nlohmann::json>(400, "Could not find `" + expanded_search_field + "` field in the schema.");
return Option<nlohmann::json>(404, "Could not find `" + expanded_search_field + "` field in the schema.");
}
auto search_field = search_schema.at(expanded_search_field);