Re-display user's query with an error message if an error occurs (#1346)

* Ignore _shape when returning errors
This commit is contained in:
Simon Willison 2021-06-01 23:46:20 -04:00 committed by GitHub
commit 9552414e1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 44 additions and 13 deletions

View file

@ -352,5 +352,5 @@ def test_magic_parameters_cannot_be_used_in_arbitrary_queries(magic_parameters_c
response = magic_parameters_client.get(
"/data.json?sql=select+:_header_host&_shape=array"
)
assert 500 == response.status
assert 400 == response.status
assert "You did not supply a value for binding 1." == response.json["error"]