feat(timeline): add ErrorCodes for event CRUD
Add TIMELINE_EVENT_NOT_FOUND (404), TIMELINE_EVENT_CONFLICT (409), TIMELINE_TITLE_TOO_LONG (400), and a generic CONFLICT (409) used by the optimistic-lock backstop. Per #775 / ADR-040. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -155,6 +155,14 @@ public enum ErrorCode {
|
||||
/** The merge target is a descendant of the source tag. 400 */
|
||||
TAG_MERGE_INVALID_TARGET,
|
||||
|
||||
// --- Timeline (Zeitstrahl) ---
|
||||
/** A timeline event with the given ID does not exist. 404 */
|
||||
TIMELINE_EVENT_NOT_FOUND,
|
||||
/** Optimistic-locking conflict — the timeline event was modified by another curator. 409 */
|
||||
TIMELINE_EVENT_CONFLICT,
|
||||
/** A timeline event title exceeds the maximum length (255 characters — the DB column bound). 400 */
|
||||
TIMELINE_TITLE_TOO_LONG,
|
||||
|
||||
// --- Generic ---
|
||||
/** Request validation failed (missing or malformed fields). 400 */
|
||||
VALIDATION_ERROR,
|
||||
@@ -162,6 +170,8 @@ public enum ErrorCode {
|
||||
BATCH_TOO_LARGE,
|
||||
/** Bulk edit request exceeds the per-request document ID cap. 400 */
|
||||
BULK_EDIT_TOO_MANY_IDS,
|
||||
/** A concurrent modification was detected (generic optimistic-lock backstop). 409 */
|
||||
CONFLICT,
|
||||
/** An unexpected server-side error occurred. 500 */
|
||||
INTERNAL_ERROR,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user