{"action":"created","comment":{"url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/comments/65547160","id":65547160,"diff_hunk":"@@ -80,7 +80,12 @@ def slack_message(message, webhook, text_attachment = nil)\n     http.verify_mode = OpenSSL::SSL::VERIFY_NONE\n     req = Net::HTTP::Post.new(uri.path, 'Content-Type' => 'application/json')\n     req.body = request_body(message, text_attachment)\n-    http.request(req)\n+    res = http.request(req)\n+    # responses can be:\n+    # \"Bad token\"\n+    # \"invalid_payload\"\n+    # \"ok\"\n+    raise res.body unless res.body == 'ok'","path":"files/default/slack_handler_webhook.rb","position":10,"original_position":10,"commit_id":"7633604aafb597059a2deaee1104095b5d7006d3","original_commit_id":"7633604aafb597059a2deaee1104095b5d7006d3","user":{"login":"martinb3","id":103033,"avatar_url":"https://avatars.githubusercontent.com/u/103033?v=3","gravatar_id":"","url":"https://api.github.com/users/martinb3","html_url":"https://github.com/martinb3","followers_url":"https://api.github.com/users/martinb3/followers","following_url":"https://api.github.com/users/martinb3/following{/other_user}","gists_url":"https://api.github.com/users/martinb3/gists{/gist_id}","starred_url":"https://api.github.com/users/martinb3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinb3/subscriptions","organizations_url":"https://api.github.com/users/martinb3/orgs","repos_url":"https://api.github.com/users/martinb3/repos","events_url":"https://api.github.com/users/martinb3/events{/privacy}","received_events_url":"https://api.github.com/users/martinb3/received_events","type":"User","site_admin":false},"body":"No, it's wrapped in a rescue on L55.","created_at":"2016-06-02T14:15:59Z","updated_at":"2016-06-02T14:15:59Z","html_url":"https://github.com/rackspace-cookbooks/chef-slack_handler/pull/30#discussion_r65547160","pull_request_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/comments/65547160"},"html":{"href":"https://github.com/rackspace-cookbooks/chef-slack_handler/pull/30#discussion_r65547160"},"pull_request":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30","id":72157890,"html_url":"https://github.com/rackspace-cookbooks/chef-slack_handler/pull/30","diff_url":"https://github.com/rackspace-cookbooks/chef-slack_handler/pull/30.diff","patch_url":"https://github.com/rackspace-cookbooks/chef-slack_handler/pull/30.patch","issue_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues/30","number":30,"state":"closed","locked":false,"title":"webhook: check http response","user":{"login":"glensc","id":199095,"avatar_url":"https://avatars.githubusercontent.com/u/199095?v=3","gravatar_id":"","url":"https://api.github.com/users/glensc","html_url":"https://github.com/glensc","followers_url":"https://api.github.com/users/glensc/followers","following_url":"https://api.github.com/users/glensc/following{/other_user}","gists_url":"https://api.github.com/users/glensc/gists{/gist_id}","starred_url":"https://api.github.com/users/glensc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glensc/subscriptions","organizations_url":"https://api.github.com/users/glensc/orgs","repos_url":"https://api.github.com/users/glensc/repos","events_url":"https://api.github.com/users/glensc/events{/privacy}","received_events_url":"https://api.github.com/users/glensc/received_events","type":"User","site_admin":false},"body":"will make slack webhook errors visible:\r\n\r\n```\r\n[2016-06-01T13:43:49+03:00] WARN: Failed to send message to Slack: Bad token\r\n```","created_at":"2016-06-01T10:35:52Z","updated_at":"2016-06-02T14:15:59Z","closed_at":"2016-06-01T13:06:24Z","merged_at":"2016-06-01T13:06:24Z","merge_commit_sha":"483dde69ba1b8bfd29f510a03ec1596cc2b29f9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30/commits","review_comments_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30/comments","review_comment_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues/30/comments","statuses_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/statuses/7633604aafb597059a2deaee1104095b5d7006d3","head":{"label":"glensc:webhook_errors","ref":"webhook_errors","sha":"7633604aafb597059a2deaee1104095b5d7006d3","user":{"login":"glensc","id":199095,"avatar_url":"https://avatars.githubusercontent.com/u/199095?v=3","gravatar_id":"","url":"https://api.github.com/users/glensc","html_url":"https://github.com/glensc","followers_url":"https://api.github.com/users/glensc/followers","following_url":"https://api.github.com/users/glensc/following{/other_user}","gists_url":"https://api.github.com/users/glensc/gists{/gist_id}","starred_url":"https://api.github.com/users/glensc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glensc/subscriptions","organizations_url":"https://api.github.com/users/glensc/orgs","repos_url":"https://api.github.com/users/glensc/repos","events_url":"https://api.github.com/users/glensc/events{/privacy}","received_events_url":"https://api.github.com/users/glensc/received_events","type":"User","site_admin":false},"repo":{"id":60076380,"name":"chef-cookbook-slack_handler","full_name":"glensc/chef-cookbook-slack_handler","owner":{"login":"glensc","id":199095,"avatar_url":"https://avatars.githubusercontent.com/u/199095?v=3","gravatar_id":"","url":"https://api.github.com/users/glensc","html_url":"https://github.com/glensc","followers_url":"https://api.github.com/users/glensc/followers","following_url":"https://api.github.com/users/glensc/following{/other_user}","gists_url":"https://api.github.com/users/glensc/gists{/gist_id}","starred_url":"https://api.github.com/users/glensc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glensc/subscriptions","organizations_url":"https://api.github.com/users/glensc/orgs","repos_url":"https://api.github.com/users/glensc/repos","events_url":"https://api.github.com/users/glensc/events{/privacy}","received_events_url":"https://api.github.com/users/glensc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/glensc/chef-cookbook-slack_handler","description":"Slack handler for Chef","fork":true,"url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler","forks_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/forks","keys_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/teams","hooks_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/hooks","issue_events_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/issues/events{/number}","events_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/events","assignees_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/assignees{/user}","branches_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/branches{/branch}","tags_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/tags","blobs_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/git/refs{/sha}","trees_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/statuses/{sha}","languages_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/languages","stargazers_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/stargazers","contributors_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/contributors","subscribers_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/subscribers","subscription_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/subscription","commits_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/commits{/sha}","git_commits_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/git/commits{/sha}","comments_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/comments{/number}","issue_comment_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/issues/comments{/number}","contents_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/contents/{+path}","compare_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/merges","archive_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/downloads","issues_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/issues{/number}","pulls_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/pulls{/number}","milestones_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/milestones{/number}","notifications_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/labels{/name}","releases_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/releases{/id}","deployments_url":"https://api.github.com/repos/glensc/chef-cookbook-slack_handler/deployments","created_at":"2016-05-31T09:30:56Z","updated_at":"2016-06-01T10:34:21Z","pushed_at":"2016-06-01T14:12:18Z","git_url":"git://github.com/glensc/chef-cookbook-slack_handler.git","ssh_url":"git@github.com:glensc/chef-cookbook-slack_handler.git","clone_url":"https://github.com/glensc/chef-cookbook-slack_handler.git","svn_url":"https://github.com/glensc/chef-cookbook-slack_handler","homepage":"https://supermarket.chef.io/cookbooks/slack_handler","size":65,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rackspace-cookbooks:master","ref":"master","sha":"0fff6f74ce008b42a99d0986c2cc93721706f657","user":{"login":"rackspace-cookbooks","id":4324934,"avatar_url":"https://avatars.githubusercontent.com/u/4324934?v=3","gravatar_id":"","url":"https://api.github.com/users/rackspace-cookbooks","html_url":"https://github.com/rackspace-cookbooks","followers_url":"https://api.github.com/users/rackspace-cookbooks/followers","following_url":"https://api.github.com/users/rackspace-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/rackspace-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/rackspace-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackspace-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/rackspace-cookbooks/orgs","repos_url":"https://api.github.com/users/rackspace-cookbooks/repos","events_url":"https://api.github.com/users/rackspace-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/rackspace-cookbooks/received_events","type":"Organization","site_admin":false},"repo":{"id":35827755,"name":"chef-slack_handler","full_name":"rackspace-cookbooks/chef-slack_handler","owner":{"login":"rackspace-cookbooks","id":4324934,"avatar_url":"https://avatars.githubusercontent.com/u/4324934?v=3","gravatar_id":"","url":"https://api.github.com/users/rackspace-cookbooks","html_url":"https://github.com/rackspace-cookbooks","followers_url":"https://api.github.com/users/rackspace-cookbooks/followers","following_url":"https://api.github.com/users/rackspace-cookbooks/following{/other_user}","gists_url":"https://api.github.com/users/rackspace-cookbooks/gists{/gist_id}","starred_url":"https://api.github.com/users/rackspace-cookbooks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackspace-cookbooks/subscriptions","organizations_url":"https://api.github.com/users/rackspace-cookbooks/orgs","repos_url":"https://api.github.com/users/rackspace-cookbooks/repos","events_url":"https://api.github.com/users/rackspace-cookbooks/events{/privacy}","received_events_url":"https://api.github.com/users/rackspace-cookbooks/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackspace-cookbooks/chef-slack_handler","description":"Slack handler for Chef","fork":false,"url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler","forks_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/forks","keys_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/teams","hooks_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/hooks","issue_events_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues/events{/number}","events_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/events","assignees_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/assignees{/user}","branches_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/branches{/branch}","tags_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/tags","blobs_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/statuses/{sha}","languages_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/languages","stargazers_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/stargazers","contributors_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/contributors","subscribers_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/subscribers","subscription_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/subscription","commits_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/contents/{+path}","compare_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/merges","archive_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/downloads","issues_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues{/number}","pulls_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls{/number}","milestones_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/milestones{/number}","notifications_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/labels{/name}","releases_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/releases{/id}","deployments_url":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/deployments","created_at":"2015-05-18T16:01:54Z","updated_at":"2016-04-23T04:59:49Z","pushed_at":"2016-06-01T13:06:24Z","git_url":"git://github.com/rackspace-cookbooks/chef-slack_handler.git","ssh_url":"git@github.com:rackspace-cookbooks/chef-slack_handler.git","clone_url":"https://github.com/rackspace-cookbooks/chef-slack_handler.git","svn_url":"https://github.com/rackspace-cookbooks/chef-slack_handler","homepage":"https://supermarket.chef.io/cookbooks/slack_handler","size":68,"stargazers_count":13,"watchers_count":13,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":2,"forks":13,"open_issues":2,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30"},"html":{"href":"https://github.com/rackspace-cookbooks/chef-slack_handler/pull/30"},"issue":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues/30"},"comments":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/rackspace-cookbooks/chef-slack_handler/statuses/7633604aafb597059a2deaee1104095b5d7006d3"}}}}
{"actor":{"display_login":"martinb3"}}