From 9ef141c9b43bac1efd21448e160c0aa899a74b8a Mon Sep 17 00:00:00 2001 From: adityaanikam Date: Sun, 16 Aug 2026 20:20:29 +0530 Subject: [PATCH 1/2] fix: correct DOCUMENT_ALREADY_EXISTS and DOCUMENT_REPLACE_DIFFERENT_DOCID error message wording --- src/main/resources/errors.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/errors.yaml b/src/main/resources/errors.yaml index eb80537c91..0714cc7aab 100644 --- a/src/main/resources/errors.yaml +++ b/src/main/resources/errors.yaml @@ -344,7 +344,7 @@ request-errors: # DOCUMENT request errors - scope: DOCUMENT code: DOCUMENT_ALREADY_EXISTS - title: Document the given _id already exists + title: Document with the given _id already exists body: |- Cannot insert the document: a document already exists with given '_id' (${id}). @@ -352,7 +352,7 @@ request-errors: - scope: DOCUMENT code: DOCUMENT_REPLACE_DIFFERENT_DOCID - title: Document the given _id already exists + title: Document with the given _id already exists body: |- The replace document and document resolved using filter have different '_id's: ${replaceId} (replace document) vs. ${matchedId} (document that filter matches). From 6fbe51e82a4c1f9fa4ae0416f166fdceeffff2b1 Mon Sep 17 00:00:00 2001 From: adityaanikam Date: Sun, 6 Sep 2026 00:24:56 +0530 Subject: [PATCH 2/2] fix: correct DOCUMENT_REPLACE_DIFFERENT_DOCID title to match its error The title was a copy of the DOCUMENT_ALREADY_EXISTS one, which describes a different condition than this error's body: the replace document and the document matched by the filter having different _id values. Only the title changes. The tests covering this error assert on the code and the message body, and the DOCUMENT_ALREADY_EXISTS title is left as is. --- src/main/resources/errors.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/errors.yaml b/src/main/resources/errors.yaml index 1e909e132d..38068f157a 100644 --- a/src/main/resources/errors.yaml +++ b/src/main/resources/errors.yaml @@ -352,7 +352,7 @@ request-errors: - scope: DOCUMENT code: DOCUMENT_REPLACE_DIFFERENT_DOCID - title: Document with the given _id already exists + title: Target and replacement documents have different _id body: |- The replace document and document resolved using filter have different '_id's: ${replaceId} (replace document) vs. ${matchedId} (document that filter matches).