Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/resources/errors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -344,15 +344,15 @@ 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}).

Either resend the command with distinct '_id', or use an update command instead.

- scope: DOCUMENT
code: DOCUMENT_REPLACE_DIFFERENT_DOCID
title: Document the given _id already exists
title: Document with the given _id already exists

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to something like "Target and replacement documents have different _id" (leaving this title is a copy-paste oversight)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch that title was describing DOCUMENT_ALREADY_EXISTS, not this error. Changed it to your wording.

I checked the rest of the file: the other repeated titles (Bad $vector value, Failed database request) look intentional, since those codes are variants of one condition.

body: |-
The replace document and document resolved using filter have different '_id's: ${replaceId} (replace document) vs. ${matchedId} (document that filter matches).

Expand Down