{"html_url": "https://github.com/simonw/datasette/issues/193#issuecomment-380619851", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/193", "id": 380619851, "node_id": "MDEyOklzc3VlQ29tbWVudDM4MDYxOTg1MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-11T22:48:19Z", "updated_at": "2018-04-11T22:48:19Z", "author_association": "OWNER", "body": "I can clean this up further with the mechanism I'm using for #184", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 310882100, "label": "Cleaner mechanism for handling custom errors"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/193#issuecomment-379624163", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/193", "id": 379624163, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTYyNDE2Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2018-04-09T04:03:49Z", "updated_at": "2018-04-09T04:03:49Z", "author_association": "OWNER", "body": "This is harder than I thought, because the `_shape=` logic actually runs AFTER the main block of code which is set up to catch exceptions - this code here:\r\n\r\nhttps://github.com/simonw/datasette/blob/0abd3abacb309a2bd5913a7a2df4e9256585b1bb/datasette/app.py#L200-L216", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 310882100, "label": "Cleaner mechanism for handling custom errors"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/193#issuecomment-379142500", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/193", "id": 379142500, "node_id": "MDEyOklzc3VlQ29tbWVudDM3OTE0MjUwMA==", "user": {"value": 222245, "label": "carlmjohnson"}, "created_at": "2018-04-06T04:05:58Z", "updated_at": "2018-04-06T04:05:58Z", "author_association": "NONE", "body": "You could try pulling out a validate query strings method. If it fails validation build the error object from the message. If it passes, you only need to go down a happy path. ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 310882100, "label": "Cleaner mechanism for handling custom errors"}, "performed_via_github_app": null}