mirror of
https://github.com/simonw/datasette.git
synced 2026-07-10 09:34:35 +02:00
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:
parent
e8048e023f
commit
b2cdc81d34
4 changed files with 40 additions and 6 deletions
|
|
@ -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`.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue