feat(relationship): add INVALID_RELATIONSHIP_DATES error code

New 400 error code for a relationship whose toDate precedes its fromDate,
registered in all four sites at once (ErrorCode.java, errors.ts,
getErrorMessage, messages/{de,en,es}.json) per constitution §3.6. Thrown by
the relationship date validation introduced in the following commit.

Refs #837
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-14 18:19:07 +02:00
parent 239565ea20
commit 47b1ad6199
5 changed files with 8 additions and 0 deletions

View File

@@ -122,6 +122,8 @@ public enum ErrorCode {
CIRCULAR_RELATIONSHIP,
/** A relationship with the same (person, relatedPerson, type) already exists. 409 */
DUPLICATE_RELATIONSHIP,
/** A relationship's toDate is before its fromDate. 400 */
INVALID_RELATIONSHIP_DATES,
// --- Geschichten (Stories) ---
/** A Geschichte (story) with the given ID does not exist, or is a DRAFT and the caller lacks BLOG_WRITE. 404 */