{"action":"created","comment":{"url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/comments/41529743","id":41529743,"diff_hunk":"@@ -90,24 +93,22 @@ def create(self, request, format=None):\n \n             try:\n                 headers = {\n-                    'Authorization': 'Token 5e971505f6901ec76bfb53c990b2ab488d2d08e6',\n+                    'Authorization': 'Token ' + settings.TANGENT_ADMIN_TOKEN,\n                     'Content-Type': 'application/json'\n                 }\n \n-                response = requests.post(\"http://hoursservice.staging.tangentmicroservices.com/api/v1/entry/\", headers=headers, data=json.dumps(entry))\n-\n-                if response.status_code == requests.codes.accepted:\n-\n-                    hipchat_response = {\"color\": \"green\",\"message\": \"It's going to be sunny tomorrow! (yey)\",\"notify\": False,\"message_format\": \"text\"}\n-                    return Response(json.decode(hipchat_response), status=status.HTTP_200_OK)\n+                response = requests.post( settings.HOURSSERVICE_BASE_URI +\"/entry/\", headers=headers, data=json.dumps(entry))\n+                # print response.status_code\n+                if response.status_code == requests.codes.created:\n+                    return Response(json.dumps({\"color\": \"green\",\"message\": \"Entry successfully logged (rockon)\",\"notify\": False,\"message_format\": \"text\"}), status=status.HTTP_200_OK)\n                 else:\n-                    return Response(response.text, status=status.HTTP_400_BAD_REQUEST)\n+                    return Response(json.dumps({\"color\": \"red\",\"message\": \"Entry could not be logged (sadpanda)\",\"notify\": False,\"message_format\": \"text\"}), status=status.HTTP_400_BAD_REQUEST)\n \n             except requests.HTTPError as e:\n-                print ('HTTP ERROR %s occured' % e.code)\n-                print (e)\n+                # print ('HTTP ERROR %s occured' % e.code)\n+                raise e","path":"hipchat/views.py","position":64,"original_position":64,"commit_id":"e88e8e73468a01ff174573ad05177879aa65a89e","original_commit_id":"e88e8e73468a01ff174573ad05177879aa65a89e","user":{"login":"toast38coza","id":517966,"avatar_url":"https://avatars.githubusercontent.com/u/517966?v=3","gravatar_id":"","url":"https://api.github.com/users/toast38coza","html_url":"https://github.com/toast38coza","followers_url":"https://api.github.com/users/toast38coza/followers","following_url":"https://api.github.com/users/toast38coza/following{/other_user}","gists_url":"https://api.github.com/users/toast38coza/gists{/gist_id}","starred_url":"https://api.github.com/users/toast38coza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toast38coza/subscriptions","organizations_url":"https://api.github.com/users/toast38coza/orgs","repos_url":"https://api.github.com/users/toast38coza/repos","events_url":"https://api.github.com/users/toast38coza/events{/privacy}","received_events_url":"https://api.github.com/users/toast38coza/received_events","type":"User","site_admin":false},"body":"Why would you catch an exception only to raise it? ","created_at":"2015-10-08T15:40:05Z","updated_at":"2015-10-08T15:40:05Z","html_url":"https://github.com/TangentMicroServices/IncomingTransactionService/pull/15#discussion_r41529743","pull_request_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/comments/41529743"},"html":{"href":"https://github.com/TangentMicroServices/IncomingTransactionService/pull/15#discussion_r41529743"},"pull_request":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15","id":47021096,"html_url":"https://github.com/TangentMicroServices/IncomingTransactionService/pull/15","diff_url":"https://github.com/TangentMicroServices/IncomingTransactionService/pull/15.diff","patch_url":"https://github.com/TangentMicroServices/IncomingTransactionService/pull/15.patch","issue_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/15","number":15,"state":"open","locked":false,"title":"removed hardcoded urls and added hipchat response","user":{"login":"kangwa","id":4491816,"avatar_url":"https://avatars.githubusercontent.com/u/4491816?v=3","gravatar_id":"","url":"https://api.github.com/users/kangwa","html_url":"https://github.com/kangwa","followers_url":"https://api.github.com/users/kangwa/followers","following_url":"https://api.github.com/users/kangwa/following{/other_user}","gists_url":"https://api.github.com/users/kangwa/gists{/gist_id}","starred_url":"https://api.github.com/users/kangwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kangwa/subscriptions","organizations_url":"https://api.github.com/users/kangwa/orgs","repos_url":"https://api.github.com/users/kangwa/repos","events_url":"https://api.github.com/users/kangwa/events{/privacy}","received_events_url":"https://api.github.com/users/kangwa/received_events","type":"User","site_admin":false},"body":"removed hardcoded urls and added hipchat response to notify","created_at":"2015-10-07T12:33:40Z","updated_at":"2015-10-08T15:40:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b13218f65dd1cd132fc6445d5007ed6e1b060965","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15/commits","review_comments_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15/comments","review_comment_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/15/comments","statuses_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/statuses/e88e8e73468a01ff174573ad05177879aa65a89e","head":{"label":"TangentMicroServices:hipchat_hours_103887330","ref":"hipchat_hours_103887330","sha":"e88e8e73468a01ff174573ad05177879aa65a89e","user":{"login":"TangentMicroServices","id":8749507,"avatar_url":"https://avatars.githubusercontent.com/u/8749507?v=3","gravatar_id":"","url":"https://api.github.com/users/TangentMicroServices","html_url":"https://github.com/TangentMicroServices","followers_url":"https://api.github.com/users/TangentMicroServices/followers","following_url":"https://api.github.com/users/TangentMicroServices/following{/other_user}","gists_url":"https://api.github.com/users/TangentMicroServices/gists{/gist_id}","starred_url":"https://api.github.com/users/TangentMicroServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TangentMicroServices/subscriptions","organizations_url":"https://api.github.com/users/TangentMicroServices/orgs","repos_url":"https://api.github.com/users/TangentMicroServices/repos","events_url":"https://api.github.com/users/TangentMicroServices/events{/privacy}","received_events_url":"https://api.github.com/users/TangentMicroServices/received_events","type":"Organization","site_admin":false},"repo":{"id":42914650,"name":"IncomingTransactionService","full_name":"TangentMicroServices/IncomingTransactionService","owner":{"login":"TangentMicroServices","id":8749507,"avatar_url":"https://avatars.githubusercontent.com/u/8749507?v=3","gravatar_id":"","url":"https://api.github.com/users/TangentMicroServices","html_url":"https://github.com/TangentMicroServices","followers_url":"https://api.github.com/users/TangentMicroServices/followers","following_url":"https://api.github.com/users/TangentMicroServices/following{/other_user}","gists_url":"https://api.github.com/users/TangentMicroServices/gists{/gist_id}","starred_url":"https://api.github.com/users/TangentMicroServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TangentMicroServices/subscriptions","organizations_url":"https://api.github.com/users/TangentMicroServices/orgs","repos_url":"https://api.github.com/users/TangentMicroServices/repos","events_url":"https://api.github.com/users/TangentMicroServices/events{/privacy}","received_events_url":"https://api.github.com/users/TangentMicroServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TangentMicroServices/IncomingTransactionService","description":"A service for fielding incoming webhooks","fork":false,"url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService","forks_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/forks","keys_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/teams","hooks_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/hooks","issue_events_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/events{/number}","events_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/events","assignees_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/assignees{/user}","branches_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/branches{/branch}","tags_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/tags","blobs_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/refs{/sha}","trees_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/statuses/{sha}","languages_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/languages","stargazers_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/stargazers","contributors_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/contributors","subscribers_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/subscribers","subscription_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/subscription","commits_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/commits{/sha}","git_commits_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/commits{/sha}","comments_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/comments{/number}","issue_comment_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/comments{/number}","contents_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/contents/{+path}","compare_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/merges","archive_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/downloads","issues_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues{/number}","pulls_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls{/number}","milestones_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/milestones{/number}","notifications_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/labels{/name}","releases_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/releases{/id}","created_at":"2015-09-22T06:03:24Z","updated_at":"2015-09-27T14:00:56Z","pushed_at":"2015-10-08T15:24:10Z","git_url":"git://github.com/TangentMicroServices/IncomingTransactionService.git","ssh_url":"git@github.com:TangentMicroServices/IncomingTransactionService.git","clone_url":"https://github.com/TangentMicroServices/IncomingTransactionService.git","svn_url":"https://github.com/TangentMicroServices/IncomingTransactionService","homepage":null,"size":288,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"TangentMicroServices:master","ref":"master","sha":"b18abf4e32589c3126b8bcbe02ceadb91e96ef62","user":{"login":"TangentMicroServices","id":8749507,"avatar_url":"https://avatars.githubusercontent.com/u/8749507?v=3","gravatar_id":"","url":"https://api.github.com/users/TangentMicroServices","html_url":"https://github.com/TangentMicroServices","followers_url":"https://api.github.com/users/TangentMicroServices/followers","following_url":"https://api.github.com/users/TangentMicroServices/following{/other_user}","gists_url":"https://api.github.com/users/TangentMicroServices/gists{/gist_id}","starred_url":"https://api.github.com/users/TangentMicroServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TangentMicroServices/subscriptions","organizations_url":"https://api.github.com/users/TangentMicroServices/orgs","repos_url":"https://api.github.com/users/TangentMicroServices/repos","events_url":"https://api.github.com/users/TangentMicroServices/events{/privacy}","received_events_url":"https://api.github.com/users/TangentMicroServices/received_events","type":"Organization","site_admin":false},"repo":{"id":42914650,"name":"IncomingTransactionService","full_name":"TangentMicroServices/IncomingTransactionService","owner":{"login":"TangentMicroServices","id":8749507,"avatar_url":"https://avatars.githubusercontent.com/u/8749507?v=3","gravatar_id":"","url":"https://api.github.com/users/TangentMicroServices","html_url":"https://github.com/TangentMicroServices","followers_url":"https://api.github.com/users/TangentMicroServices/followers","following_url":"https://api.github.com/users/TangentMicroServices/following{/other_user}","gists_url":"https://api.github.com/users/TangentMicroServices/gists{/gist_id}","starred_url":"https://api.github.com/users/TangentMicroServices/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TangentMicroServices/subscriptions","organizations_url":"https://api.github.com/users/TangentMicroServices/orgs","repos_url":"https://api.github.com/users/TangentMicroServices/repos","events_url":"https://api.github.com/users/TangentMicroServices/events{/privacy}","received_events_url":"https://api.github.com/users/TangentMicroServices/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/TangentMicroServices/IncomingTransactionService","description":"A service for fielding incoming webhooks","fork":false,"url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService","forks_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/forks","keys_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/teams","hooks_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/hooks","issue_events_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/events{/number}","events_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/events","assignees_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/assignees{/user}","branches_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/branches{/branch}","tags_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/tags","blobs_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/refs{/sha}","trees_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/statuses/{sha}","languages_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/languages","stargazers_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/stargazers","contributors_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/contributors","subscribers_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/subscribers","subscription_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/subscription","commits_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/commits{/sha}","git_commits_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/git/commits{/sha}","comments_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/comments{/number}","issue_comment_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/comments{/number}","contents_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/contents/{+path}","compare_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/merges","archive_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/downloads","issues_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues{/number}","pulls_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls{/number}","milestones_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/milestones{/number}","notifications_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/labels{/name}","releases_url":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/releases{/id}","created_at":"2015-09-22T06:03:24Z","updated_at":"2015-09-27T14:00:56Z","pushed_at":"2015-10-08T15:24:10Z","git_url":"git://github.com/TangentMicroServices/IncomingTransactionService.git","ssh_url":"git@github.com:TangentMicroServices/IncomingTransactionService.git","clone_url":"https://github.com/TangentMicroServices/IncomingTransactionService.git","svn_url":"https://github.com/TangentMicroServices/IncomingTransactionService","homepage":null,"size":288,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15"},"html":{"href":"https://github.com/TangentMicroServices/IncomingTransactionService/pull/15"},"issue":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/15"},"comments":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/TangentMicroServices/IncomingTransactionService/statuses/e88e8e73468a01ff174573ad05177879aa65a89e"}}}}