mirror of
https://github.com/simonw/datasette.git
synced 2026-07-11 01:54:44 +02:00
Plain text SQL Interrupted errors in JSON responses
The SQL time limit error embedded an HTML fragment (paragraph, textarea and script tags) as the error string in JSON responses. DatasetteError now accepts a plain_message which the exception handler prefers for JSON error bodies; the HTML error page keeps the rich message with the SQL textarea. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
parent
60bac9439d
commit
0d962deb05
7 changed files with 43 additions and 12 deletions
|
|
@ -394,9 +394,11 @@ Concerns:
|
|||
✅ Done — now 400 (fixed with §1b).
|
||||
4. ~~**Row delete 500** (§1c) — inconsistent with every sibling endpoint.~~
|
||||
✅ Done — now 400.
|
||||
5. **The "SQL Interrupted" error embeds an HTML fragment in the JSON `error`
|
||||
5. ~~**The "SQL Interrupted" error embeds an HTML fragment in the JSON `error`
|
||||
value** (views/database.py:805-820). Error strings in the JSON API should
|
||||
be plain text.
|
||||
be plain text.~~ ✅ **Done** — `DatasetteError` gained a `plain_message`
|
||||
used for JSON responses; the HTML error page keeps the rich version with
|
||||
the SQL textarea. §8 is now fully resolved.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue