{"action":"created","comment":{"url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/comments/95872141","pull_request_review_id":16442223,"id":95872141,"diff_hunk":"@@ -78,7 +79,12 @@ def get_context_data(self, **kwargs):\n             retrieve_public_profile_by_companies_house_number\n         )\n         response = api_call(number=self.kwargs['company_number'])\n-        if not response.ok:\n+        if response.status_code == http.client.NOT_FOUND:\n+            raise Http404(\n+                \"API returned 404 for company number %s\",","path":"company/views.py","position":15,"original_position":15,"commit_id":"c2600130a14408df5c017920fbd98687f79f1efa","original_commit_id":"c2600130a14408df5c017920fbd98687f79f1efa","user":{"login":"richtier","id":5485798,"avatar_url":"https://avatars.githubusercontent.com/u/5485798?v=3","gravatar_id":"","url":"https://api.github.com/users/richtier","html_url":"https://github.com/richtier","followers_url":"https://api.github.com/users/richtier/followers","following_url":"https://api.github.com/users/richtier/following{/other_user}","gists_url":"https://api.github.com/users/richtier/gists{/gist_id}","starred_url":"https://api.github.com/users/richtier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richtier/subscriptions","organizations_url":"https://api.github.com/users/richtier/orgs","repos_url":"https://api.github.com/users/richtier/repos","events_url":"https://api.github.com/users/richtier/events{/privacy}","received_events_url":"https://api.github.com/users/richtier/received_events","type":"User","site_admin":false},"body":"Will the user be presented with this message? If so a simple 'company %s not found' message would be preferable, rather than getting technical. ","created_at":"2017-01-12T19:57:49Z","updated_at":"2017-01-12T19:57:56Z","html_url":"https://github.com/uktrade/directory-ui-supplier/pull/42#discussion_r95872141","pull_request_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42","_links":{"self":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/comments/95872141"},"html":{"href":"https://github.com/uktrade/directory-ui-supplier/pull/42#discussion_r95872141"},"pull_request":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42","id":101327569,"html_url":"https://github.com/uktrade/directory-ui-supplier/pull/42","diff_url":"https://github.com/uktrade/directory-ui-supplier/pull/42.diff","patch_url":"https://github.com/uktrade/directory-ui-supplier/pull/42.patch","issue_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/42","number":42,"state":"open","locked":false,"title":"Raise 404 not 500 when api raises 404","user":{"login":"monikasulik","id":3541250,"avatar_url":"https://avatars.githubusercontent.com/u/3541250?v=3","gravatar_id":"","url":"https://api.github.com/users/monikasulik","html_url":"https://github.com/monikasulik","followers_url":"https://api.github.com/users/monikasulik/followers","following_url":"https://api.github.com/users/monikasulik/following{/other_user}","gists_url":"https://api.github.com/users/monikasulik/gists{/gist_id}","starred_url":"https://api.github.com/users/monikasulik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monikasulik/subscriptions","organizations_url":"https://api.github.com/users/monikasulik/orgs","repos_url":"https://api.github.com/users/monikasulik/repos","events_url":"https://api.github.com/users/monikasulik/events{/privacy}","received_events_url":"https://api.github.com/users/monikasulik/received_events","type":"User","site_admin":false},"body":"https://uktrade.atlassian.net/browse/ED-705","created_at":"2017-01-12T19:48:39Z","updated_at":"2017-01-12T19:57:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a7f5a8c1f9ae63d4fc9428058038f7f2c04ca08","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42/commits","review_comments_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42/comments","review_comment_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/comments{/number}","comments_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/42/comments","statuses_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/statuses/c2600130a14408df5c017920fbd98687f79f1efa","head":{"label":"uktrade:ED-705_api404_bug","ref":"ED-705_api404_bug","sha":"c2600130a14408df5c017920fbd98687f79f1efa","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":76881945,"name":"directory-ui-supplier","full_name":"uktrade/directory-ui-supplier","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/directory-ui-supplier","description":null,"fork":false,"url":"https://api.github.com/repos/uktrade/directory-ui-supplier","forks_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/forks","keys_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/teams","hooks_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/hooks","issue_events_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/events","assignees_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/tags","blobs_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/languages","stargazers_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/stargazers","contributors_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/contributors","subscribers_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/subscribers","subscription_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/subscription","commits_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/merges","archive_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/downloads","issues_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/deployments","created_at":"2016-12-19T17:18:14Z","updated_at":"2016-12-28T12:11:59Z","pushed_at":"2017-01-12T19:48:46Z","git_url":"git://github.com/uktrade/directory-ui-supplier.git","ssh_url":"git@github.com:uktrade/directory-ui-supplier.git","clone_url":"https://github.com/uktrade/directory-ui-supplier.git","svn_url":"https://github.com/uktrade/directory-ui-supplier","homepage":null,"size":40999,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"uktrade:master","ref":"master","sha":"e6b6d945684de0f8715c934a8437911b8da76ede","user":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"repo":{"id":76881945,"name":"directory-ui-supplier","full_name":"uktrade/directory-ui-supplier","owner":{"login":"uktrade","id":15107524,"avatar_url":"https://avatars.githubusercontent.com/u/15107524?v=3","gravatar_id":"","url":"https://api.github.com/users/uktrade","html_url":"https://github.com/uktrade","followers_url":"https://api.github.com/users/uktrade/followers","following_url":"https://api.github.com/users/uktrade/following{/other_user}","gists_url":"https://api.github.com/users/uktrade/gists{/gist_id}","starred_url":"https://api.github.com/users/uktrade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uktrade/subscriptions","organizations_url":"https://api.github.com/users/uktrade/orgs","repos_url":"https://api.github.com/users/uktrade/repos","events_url":"https://api.github.com/users/uktrade/events{/privacy}","received_events_url":"https://api.github.com/users/uktrade/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/uktrade/directory-ui-supplier","description":null,"fork":false,"url":"https://api.github.com/repos/uktrade/directory-ui-supplier","forks_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/forks","keys_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/keys{/key_id}","collaborators_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/teams","hooks_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/hooks","issue_events_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/events{/number}","events_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/events","assignees_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/assignees{/user}","branches_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/branches{/branch}","tags_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/tags","blobs_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/refs{/sha}","trees_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/trees{/sha}","statuses_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/statuses/{sha}","languages_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/languages","stargazers_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/stargazers","contributors_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/contributors","subscribers_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/subscribers","subscription_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/subscription","commits_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/commits{/sha}","git_commits_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/git/commits{/sha}","comments_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/comments{/number}","issue_comment_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/comments{/number}","contents_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/contents/{+path}","compare_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/compare/{base}...{head}","merges_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/merges","archive_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/downloads","issues_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues{/number}","pulls_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls{/number}","milestones_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/milestones{/number}","notifications_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/labels{/name}","releases_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/releases{/id}","deployments_url":"https://api.github.com/repos/uktrade/directory-ui-supplier/deployments","created_at":"2016-12-19T17:18:14Z","updated_at":"2016-12-28T12:11:59Z","pushed_at":"2017-01-12T19:48:46Z","git_url":"git://github.com/uktrade/directory-ui-supplier.git","ssh_url":"git@github.com:uktrade/directory-ui-supplier.git","clone_url":"https://github.com/uktrade/directory-ui-supplier.git","svn_url":"https://github.com/uktrade/directory-ui-supplier","homepage":null,"size":40999,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42"},"html":{"href":"https://github.com/uktrade/directory-ui-supplier/pull/42"},"issue":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/42"},"comments":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/uktrade/directory-ui-supplier/statuses/c2600130a14408df5c017920fbd98687f79f1efa"}}}}
{"actor":{"display_login":"richtier"}}