{"html_url": "https://github.com/simonw/datasette/pull/1346#issuecomment-852693854", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1346", "id": 852693854, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MjY5Mzg1NA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-06-02T03:44:35Z", "updated_at": "2021-06-02T03:44:35Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#1346](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (3bffc35) into [main](https://codecov.io/gh/simonw/datasette/commit/7b106e106000713bbee31b34d694b3dadbd4818c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (7b106e1) will **increase** coverage by `0.14%`.\n> The diff coverage is `100.00%`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/datasette/pull/1346/graphs/tree.svg?width=650&height=150&src=pr&token=eSahVY7kw1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n```diff\n@@ Coverage Diff @@\n## main #1346 +/- ##\n==========================================\n+ Coverage 91.56% 91.71% +0.14% \n==========================================\n Files 34 34 \n Lines 4282 4332 +50 \n==========================================\n+ Hits 3921 3973 +52 \n+ Misses 361 359 -2 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage \u0394 | |\n|---|---|---|\n| [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `95.69% <\u00f8> (-0.15%)` | :arrow_down: |\n| [datasette/renderer.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3JlbmRlcmVyLnB5) | `94.20% <100.00%> (+0.17%)` | :arrow_up: |\n| [datasette/utils/\\_\\_init\\_\\_.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL19faW5pdF9fLnB5) | `94.36% <100.00%> (+0.05%)` | :arrow_up: |\n| [datasette/views/base.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2Jhc2UucHk=) | `95.41% <100.00%> (+0.39%)` | :arrow_up: |\n| [datasette/views/database.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL2RhdGFiYXNlLnB5) | `97.28% <100.00%> (+0.09%)` | :arrow_up: |\n| [datasette/views/table.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3ZpZXdzL3RhYmxlLnB5) | `95.90% <100.00%> (+0.07%)` | :arrow_up: |\n| [datasette/tracer.py](https://codecov.io/gh/simonw/datasette/pull/1346/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3RyYWNlci5weQ==) | `85.05% <0.00%> (+3.44%)` | :arrow_up: |\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [7b106e1...3bffc35](https://codecov.io/gh/simonw/datasette/pull/1346?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904537568, "label": "Re-display user's query with an error message if an error occurs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1346#issuecomment-850059328", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1346", "id": 850059328, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1OTMyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:08:10Z", "updated_at": "2021-05-28T02:09:25Z", "author_association": "OWNER", "body": "This is the current test failure, but it actually another problem that we don't have tests in place for errors with different formats and shapes:\r\n\r\n```\r\n def test_magic_parameters_cannot_be_used_in_arbitrary_queries(magic_parameters_client):\r\n response = magic_parameters_client.get(\r\n \"/data.json?sql=select+:_header_host&_shape=array\"\r\n )\r\n assert 400 == response.status\r\n> assert \"You did not supply a value for binding 1.\" == response.json[\"error\"]\r\nE TypeError: list indices must be integers or slices, not str\r\n```\r\n\r\nThe test fails because `response.json` here is the empty list `[]`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904537568, "label": "Re-display user's query with an error message if an error occurs"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1346#issuecomment-850058851", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1346", "id": 850058851, "node_id": "MDEyOklzc3VlQ29tbWVudDg1MDA1ODg1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-05-28T02:06:46Z", "updated_at": "2021-05-28T02:06:46Z", "author_association": "OWNER", "body": "The one test failure here actually illustrates a larger problem: if the user specifies `.json?_shape=array` but an error occurs, what should we do?\r\n\r\nPrior to this change we return the following JSON:\r\n```json\r\n{\r\n \"ok\": false,\r\n \"error\": \"You did not supply a value for binding 1.\",\r\n \"status\": 500,\r\n \"title\": null\r\n}\r\n```\r\nBut this comes from the `handle_500` higher level code here: https://github.com/simonw/datasette/blob/eae3084b46e2c3931db12cdef79093ad0e644bce/datasette/app.py#L1251-L1263", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 904537568, "label": "Re-display user's query with an error message if an error occurs"}, "performed_via_github_app": null}