feat(person): ErrorCode.PERSON_RENAME_CONFLICT for optimistic-lock conflicts
Adds the structured error code returned when a rename rolls back because a referenced transcription block was edited concurrently (OptimisticLockException on transcription_blocks.version). Mirrors the contract in frontend src/lib/errors.ts and adds the localised message keys error_person_rename_conflict in de/en/es so the UI surfaces a retry hint instead of a generic 500. The actual translation of OptimisticLockException → DomainException (PERSON_RENAME_CONFLICT) lands in the next commit alongside the integration test that proves the rollback semantics. Refs #362 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -15,6 +15,10 @@ public enum ErrorCode {
|
||||
ALIAS_NOT_FOUND,
|
||||
/** The submitted personType value is not allowed (e.g. SKIP is import-only). 400 */
|
||||
INVALID_PERSON_TYPE,
|
||||
/** A concurrent edit on a referenced transcription block prevented the rename
|
||||
* from committing (optimistic-lock conflict). The whole rename rolls back; the
|
||||
* client should refetch and retry. 409 */
|
||||
PERSON_RENAME_CONFLICT,
|
||||
|
||||
// --- Documents ---
|
||||
/** A document with the given ID does not exist. 404 */
|
||||
|
||||
Reference in New Issue
Block a user