diff --git a/src/collection.cpp b/src/collection.cpp index ae0c68fb..aaa51843 100644 --- a/src/collection.cpp +++ b/src/collection.cpp @@ -112,7 +112,7 @@ Option Collection::to_doc(const std::string & json_str, nlohmann:: } if(document.count("id") != 0 && id != "" && document["id"] != id) { - return Option(400, "The `id` of the resource does not match the `id` on the JSON body."); + return Option(400, "The `id` of the resource does not match the `id` in the JSON body."); } if(document.count("id") == 0 && !id.empty()) { diff --git a/test/collection_test.cpp b/test/collection_test.cpp index ba8ff13a..efdc33b8 100644 --- a/test/collection_test.cpp +++ b/test/collection_test.cpp @@ -2616,7 +2616,7 @@ TEST_F(CollectionTest, UpdateDocument) { add_op = coll1->add(doc5.dump(), UPSERT, "799"); ASSERT_FALSE(add_op.ok()); ASSERT_EQ(400, add_op.code()); - ASSERT_STREQ("The `id` of the resource does not match the `id` on the JSON body.", add_op.error().c_str()); + ASSERT_STREQ("The `id` of the resource does not match the `id` in the JSON body.", add_op.error().c_str()); // passing an empty id should not succeed nlohmann::json doc6;