Return 400 instead of 500 for row delete write failures

Row delete previously returned 500 when the write failed (for example
a constraint violation raised by a trigger or foreign key), while row
update and every other write endpoint report the same failure class as
400. Delete now matches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
Claude 2026-07-04 14:55:41 +00:00
commit b2cdc81d34
No known key found for this signature in database
4 changed files with 40 additions and 6 deletions

View file

@ -968,8 +968,8 @@ does not change the SQLite schema.
- **Request:** no body required (any body is ignored — there is no
confirmation step, unlike table drop).
- **Response** — 200 `{"ok": true}`; with `?_redirect_to_table` a `redirect`
key is added. A failure during the write returns **500** with the message
(unlike update's 400). Emits `delete-row`.
key is added. A failure during the write returns 400 with the message,
matching update. Emits `delete-row`.
---