Drop the unreachable 404 from save_dashboard
Docs / docs (push) Successful in 31s
Playwright Tests / test-playwright (1, 2) (push) Failing after 2m39s
Playwright Tests / test-playwright (2, 2) (push) Failing after 1m40s
pre-commit / pre-commit (push) Failing after 2m54s
Playwright Tests / merge-reports (push) Canceled after 0s
Test Backend / test-backend (push) Canceled after 1m10s
Compose Smoke Test / test-compose (push) Canceled after 0s

write_draft creates a first draft for a name that does not exist yet, so
it raises only StaleVersion — the DashboardNotFound arm never ran.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Gf7WaExcJ9bs3kfJXB3nK
This commit is contained in:
2026-08-25 21:36:02 +02:00
co-authored by Claude Opus 5
parent 49e6bc6c4e
commit 4a2337f4de
-2
View File
@@ -125,8 +125,6 @@ async def save_dashboard(
raise HTTPException(status_code=422, detail="The name in the body must match") raise HTTPException(status_code=422, detail="The name in the body must match")
try: try:
saved = await run_in_threadpool(store.write_draft, body, body.version) saved = await run_in_threadpool(store.write_draft, body, body.version)
except DashboardNotFound:
raise HTTPException(status_code=404, detail=f"No dashboard named '{name}'")
except StaleVersion as exc: except StaleVersion as exc:
raise HTTPException( raise HTTPException(
status_code=409, status_code=409,