{"action":"created","comment":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/comments/82679663","pull_request_review_id":3570722,"id":82679663,"diff_hunk":"@@ -137,7 +138,10 @@ def _build_query_params_from_request(self, request, project):\n \n         query = request.GET.get('query', 'is:unresolved').strip()\n         if query:\n-            query_kwargs.update(parse_query(project, query, request.user))\n+            try:\n+                query_kwargs.update(parse_query(project, query, request.user))\n+            except InvalidQuery:\n+                raise ValidationError('malformed query')","path":"src/sentry/api/endpoints/project_group_index.py","position":16,"original_position":16,"commit_id":"5ea3691379c9c70863769c8f6becaffff32e763b","original_commit_id":"5ea3691379c9c70863769c8f6becaffff32e763b","user":{"login":"dcramer","id":23610,"avatar_url":"https://avatars.githubusercontent.com/u/23610?v=3","gravatar_id":"","url":"https://api.github.com/users/dcramer","html_url":"https://github.com/dcramer","followers_url":"https://api.github.com/users/dcramer/followers","following_url":"https://api.github.com/users/dcramer/following{/other_user}","gists_url":"https://api.github.com/users/dcramer/gists{/gist_id}","starred_url":"https://api.github.com/users/dcramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcramer/subscriptions","organizations_url":"https://api.github.com/users/dcramer/orgs","repos_url":"https://api.github.com/users/dcramer/repos","events_url":"https://api.github.com/users/dcramer/events{/privacy}","received_events_url":"https://api.github.com/users/dcramer/received_events","type":"User","site_admin":false},"body":"I would probably raise ValidationError with the message you want to show on the frontend. Or alternatively, on InvalidQuery, return a Response with a custom error code. That avoids us parsing a human readable string to see what's going on in API calls.","created_at":"2016-10-10T20:46:36Z","updated_at":"2016-10-10T20:46:47Z","html_url":"https://github.com/getsentry/sentry/pull/4276#discussion_r82679663","pull_request_url":"https://api.github.com/repos/getsentry/sentry/pulls/4276","_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments/82679663"},"html":{"href":"https://github.com/getsentry/sentry/pull/4276#discussion_r82679663"},"pull_request":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/4276"}}},"pull_request":{"url":"https://api.github.com/repos/getsentry/sentry/pulls/4276","id":88172208,"html_url":"https://github.com/getsentry/sentry/pull/4276","diff_url":"https://github.com/getsentry/sentry/pull/4276.diff","patch_url":"https://github.com/getsentry/sentry/pull/4276.patch","issue_url":"https://api.github.com/repos/getsentry/sentry/issues/4276","number":4276,"state":"open","locked":false,"title":"replace generic server error message in search","user":{"login":"MaxBittker","id":5915546,"avatar_url":"https://avatars.githubusercontent.com/u/5915546?v=3","gravatar_id":"","url":"https://api.github.com/users/MaxBittker","html_url":"https://github.com/MaxBittker","followers_url":"https://api.github.com/users/MaxBittker/followers","following_url":"https://api.github.com/users/MaxBittker/following{/other_user}","gists_url":"https://api.github.com/users/MaxBittker/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxBittker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxBittker/subscriptions","organizations_url":"https://api.github.com/users/MaxBittker/orgs","repos_url":"https://api.github.com/users/MaxBittker/repos","events_url":"https://api.github.com/users/MaxBittker/events{/privacy}","received_events_url":"https://api.github.com/users/MaxBittker/received_events","type":"User","site_admin":false},"body":"in the case of a bad search query, this patch now displays \"Your search query could not be parsed\"\r\nit catches DataErrors project_group_index.py and raises a validation error\r\n\r\n![screenshot 2016-10-05 15 49 18](https://cloud.githubusercontent.com/assets/5915546/19134657/29b79b1a-8b14-11e6-8453-fb58942ff1f3.png)\r\n\r\n/cc @getsentry/team","created_at":"2016-10-05T22:55:50Z","updated_at":"2016-10-10T20:46:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c0951e7ff22e5482a8ccf8ee02ed76836b68ff6","assignee":{"login":"benvinegar","id":2153,"avatar_url":"https://avatars.githubusercontent.com/u/2153?v=3","gravatar_id":"","url":"https://api.github.com/users/benvinegar","html_url":"https://github.com/benvinegar","followers_url":"https://api.github.com/users/benvinegar/followers","following_url":"https://api.github.com/users/benvinegar/following{/other_user}","gists_url":"https://api.github.com/users/benvinegar/gists{/gist_id}","starred_url":"https://api.github.com/users/benvinegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benvinegar/subscriptions","organizations_url":"https://api.github.com/users/benvinegar/orgs","repos_url":"https://api.github.com/users/benvinegar/repos","events_url":"https://api.github.com/users/benvinegar/events{/privacy}","received_events_url":"https://api.github.com/users/benvinegar/received_events","type":"User","site_admin":false},"assignees":[{"login":"benvinegar","id":2153,"avatar_url":"https://avatars.githubusercontent.com/u/2153?v=3","gravatar_id":"","url":"https://api.github.com/users/benvinegar","html_url":"https://github.com/benvinegar","followers_url":"https://api.github.com/users/benvinegar/followers","following_url":"https://api.github.com/users/benvinegar/following{/other_user}","gists_url":"https://api.github.com/users/benvinegar/gists{/gist_id}","starred_url":"https://api.github.com/users/benvinegar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benvinegar/subscriptions","organizations_url":"https://api.github.com/users/benvinegar/orgs","repos_url":"https://api.github.com/users/benvinegar/repos","events_url":"https://api.github.com/users/benvinegar/events{/privacy}","received_events_url":"https://api.github.com/users/benvinegar/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/getsentry/sentry/pulls/4276/commits","review_comments_url":"https://api.github.com/repos/getsentry/sentry/pulls/4276/comments","review_comment_url":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}","comments_url":"https://api.github.com/repos/getsentry/sentry/issues/4276/comments","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/5ea3691379c9c70863769c8f6becaffff32e763b","head":{"label":"getsentry:search-parse-error-display","ref":"search-parse-error-display","sha":"5ea3691379c9c70863769c8f6becaffff32e763b","user":{"login":"getsentry","id":1396951,"avatar_url":"https://avatars.githubusercontent.com/u/1396951?v=3","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"repo":{"id":873328,"name":"sentry","full_name":"getsentry/sentry","owner":{"login":"getsentry","id":1396951,"avatar_url":"https://avatars.githubusercontent.com/u/1396951?v=3","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getsentry/sentry","description":"Sentry is cross-platform crash reporting built with love","fork":false,"url":"https://api.github.com/repos/getsentry/sentry","forks_url":"https://api.github.com/repos/getsentry/sentry/forks","keys_url":"https://api.github.com/repos/getsentry/sentry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getsentry/sentry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getsentry/sentry/teams","hooks_url":"https://api.github.com/repos/getsentry/sentry/hooks","issue_events_url":"https://api.github.com/repos/getsentry/sentry/issues/events{/number}","events_url":"https://api.github.com/repos/getsentry/sentry/events","assignees_url":"https://api.github.com/repos/getsentry/sentry/assignees{/user}","branches_url":"https://api.github.com/repos/getsentry/sentry/branches{/branch}","tags_url":"https://api.github.com/repos/getsentry/sentry/tags","blobs_url":"https://api.github.com/repos/getsentry/sentry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getsentry/sentry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getsentry/sentry/git/refs{/sha}","trees_url":"https://api.github.com/repos/getsentry/sentry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/{sha}","languages_url":"https://api.github.com/repos/getsentry/sentry/languages","stargazers_url":"https://api.github.com/repos/getsentry/sentry/stargazers","contributors_url":"https://api.github.com/repos/getsentry/sentry/contributors","subscribers_url":"https://api.github.com/repos/getsentry/sentry/subscribers","subscription_url":"https://api.github.com/repos/getsentry/sentry/subscription","commits_url":"https://api.github.com/repos/getsentry/sentry/commits{/sha}","git_commits_url":"https://api.github.com/repos/getsentry/sentry/git/commits{/sha}","comments_url":"https://api.github.com/repos/getsentry/sentry/comments{/number}","issue_comment_url":"https://api.github.com/repos/getsentry/sentry/issues/comments{/number}","contents_url":"https://api.github.com/repos/getsentry/sentry/contents/{+path}","compare_url":"https://api.github.com/repos/getsentry/sentry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getsentry/sentry/merges","archive_url":"https://api.github.com/repos/getsentry/sentry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getsentry/sentry/downloads","issues_url":"https://api.github.com/repos/getsentry/sentry/issues{/number}","pulls_url":"https://api.github.com/repos/getsentry/sentry/pulls{/number}","milestones_url":"https://api.github.com/repos/getsentry/sentry/milestones{/number}","notifications_url":"https://api.github.com/repos/getsentry/sentry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getsentry/sentry/labels{/name}","releases_url":"https://api.github.com/repos/getsentry/sentry/releases{/id}","deployments_url":"https://api.github.com/repos/getsentry/sentry/deployments","created_at":"2010-08-30T22:06:41Z","updated_at":"2016-10-10T18:53:02Z","pushed_at":"2016-10-10T20:44:11Z","git_url":"git://github.com/getsentry/sentry.git","ssh_url":"git@github.com:getsentry/sentry.git","clone_url":"https://github.com/getsentry/sentry.git","svn_url":"https://github.com/getsentry/sentry","homepage":"https://sentry.io","size":88104,"stargazers_count":10575,"watchers_count":10575,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1253,"mirror_url":null,"open_issues_count":421,"forks":1253,"open_issues":421,"watchers":10575,"default_branch":"master"}},"base":{"label":"getsentry:master","ref":"master","sha":"9028f7235cafdfc9d90d19c6918a2d57c66dded1","user":{"login":"getsentry","id":1396951,"avatar_url":"https://avatars.githubusercontent.com/u/1396951?v=3","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"repo":{"id":873328,"name":"sentry","full_name":"getsentry/sentry","owner":{"login":"getsentry","id":1396951,"avatar_url":"https://avatars.githubusercontent.com/u/1396951?v=3","gravatar_id":"","url":"https://api.github.com/users/getsentry","html_url":"https://github.com/getsentry","followers_url":"https://api.github.com/users/getsentry/followers","following_url":"https://api.github.com/users/getsentry/following{/other_user}","gists_url":"https://api.github.com/users/getsentry/gists{/gist_id}","starred_url":"https://api.github.com/users/getsentry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/getsentry/subscriptions","organizations_url":"https://api.github.com/users/getsentry/orgs","repos_url":"https://api.github.com/users/getsentry/repos","events_url":"https://api.github.com/users/getsentry/events{/privacy}","received_events_url":"https://api.github.com/users/getsentry/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/getsentry/sentry","description":"Sentry is cross-platform crash reporting built with love","fork":false,"url":"https://api.github.com/repos/getsentry/sentry","forks_url":"https://api.github.com/repos/getsentry/sentry/forks","keys_url":"https://api.github.com/repos/getsentry/sentry/keys{/key_id}","collaborators_url":"https://api.github.com/repos/getsentry/sentry/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/getsentry/sentry/teams","hooks_url":"https://api.github.com/repos/getsentry/sentry/hooks","issue_events_url":"https://api.github.com/repos/getsentry/sentry/issues/events{/number}","events_url":"https://api.github.com/repos/getsentry/sentry/events","assignees_url":"https://api.github.com/repos/getsentry/sentry/assignees{/user}","branches_url":"https://api.github.com/repos/getsentry/sentry/branches{/branch}","tags_url":"https://api.github.com/repos/getsentry/sentry/tags","blobs_url":"https://api.github.com/repos/getsentry/sentry/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/getsentry/sentry/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/getsentry/sentry/git/refs{/sha}","trees_url":"https://api.github.com/repos/getsentry/sentry/git/trees{/sha}","statuses_url":"https://api.github.com/repos/getsentry/sentry/statuses/{sha}","languages_url":"https://api.github.com/repos/getsentry/sentry/languages","stargazers_url":"https://api.github.com/repos/getsentry/sentry/stargazers","contributors_url":"https://api.github.com/repos/getsentry/sentry/contributors","subscribers_url":"https://api.github.com/repos/getsentry/sentry/subscribers","subscription_url":"https://api.github.com/repos/getsentry/sentry/subscription","commits_url":"https://api.github.com/repos/getsentry/sentry/commits{/sha}","git_commits_url":"https://api.github.com/repos/getsentry/sentry/git/commits{/sha}","comments_url":"https://api.github.com/repos/getsentry/sentry/comments{/number}","issue_comment_url":"https://api.github.com/repos/getsentry/sentry/issues/comments{/number}","contents_url":"https://api.github.com/repos/getsentry/sentry/contents/{+path}","compare_url":"https://api.github.com/repos/getsentry/sentry/compare/{base}...{head}","merges_url":"https://api.github.com/repos/getsentry/sentry/merges","archive_url":"https://api.github.com/repos/getsentry/sentry/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/getsentry/sentry/downloads","issues_url":"https://api.github.com/repos/getsentry/sentry/issues{/number}","pulls_url":"https://api.github.com/repos/getsentry/sentry/pulls{/number}","milestones_url":"https://api.github.com/repos/getsentry/sentry/milestones{/number}","notifications_url":"https://api.github.com/repos/getsentry/sentry/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/getsentry/sentry/labels{/name}","releases_url":"https://api.github.com/repos/getsentry/sentry/releases{/id}","deployments_url":"https://api.github.com/repos/getsentry/sentry/deployments","created_at":"2010-08-30T22:06:41Z","updated_at":"2016-10-10T18:53:02Z","pushed_at":"2016-10-10T20:44:11Z","git_url":"git://github.com/getsentry/sentry.git","ssh_url":"git@github.com:getsentry/sentry.git","clone_url":"https://github.com/getsentry/sentry.git","svn_url":"https://github.com/getsentry/sentry","homepage":"https://sentry.io","size":88104,"stargazers_count":10575,"watchers_count":10575,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1253,"mirror_url":null,"open_issues_count":421,"forks":1253,"open_issues":421,"watchers":10575,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/4276"},"html":{"href":"https://github.com/getsentry/sentry/pull/4276"},"issue":{"href":"https://api.github.com/repos/getsentry/sentry/issues/4276"},"comments":{"href":"https://api.github.com/repos/getsentry/sentry/issues/4276/comments"},"review_comments":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/4276/comments"},"review_comment":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/getsentry/sentry/pulls/4276/commits"},"statuses":{"href":"https://api.github.com/repos/getsentry/sentry/statuses/5ea3691379c9c70863769c8f6becaffff32e763b"}}}}
{"actor":{"display_login":"dcramer"}}