spec: update api consistency
Align optimistic locking conflict payload, update websocket docs, and adjust tests.
This commit is contained in:
@@ -407,10 +407,13 @@ async def update_task(
|
||||
if task_data.version != task.version:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_409_CONFLICT,
|
||||
detail=(
|
||||
f"Version conflict: current_version={task.version}, "
|
||||
f"provided_version={task_data.version}"
|
||||
),
|
||||
detail={
|
||||
"error": "conflict",
|
||||
"message": "Task has been modified by another user. Please refresh and retry.",
|
||||
"current_version": task.version,
|
||||
"provided_version": task_data.version,
|
||||
"your_version": task_data.version,
|
||||
},
|
||||
)
|
||||
|
||||
# Capture old values for audit and triggers
|
||||
|
||||
Reference in New Issue
Block a user