mirror of
https://github.com/simonw/datasette.git
synced 2026-07-10 09:34:35 +02:00
Return 400 for unknown _extra names on data formats
Unknown ?_extra= names (including internal HTML-only extras such as display_rows) were silently ignored, so a typo returned the default payload with no signal. Table, row and query data formats now return 400 "Unknown _extra: <names>". HTML pages continue to ignore unknown names. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GrHZSypDfMnym1tM5XJAFZ
This commit is contained in:
parent
9ee95cab3d
commit
e0ba8b3c6a
9 changed files with 69 additions and 7 deletions
|
|
@ -283,6 +283,8 @@ These can be repeated or comma-separated:
|
|||
|
||||
?_extra=columns&_extra=count,next_url
|
||||
|
||||
Requesting an ``_extra`` name that does not exist returns a ``400`` error in the :ref:`standard error format <json_api_errors>`, for example ``{"ok": false, "error": "Unknown _extra: nope", ...}``.
|
||||
|
||||
.. [[[cog
|
||||
from json_api_doc import table_extras
|
||||
table_extras(cog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue