{"action":"closed","number":217,"pull_request":{"url":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/217","id":70969711,"html_url":"https://github.com/slackhq/node-slack-sdk/pull/217","diff_url":"https://github.com/slackhq/node-slack-sdk/pull/217.diff","patch_url":"https://github.com/slackhq/node-slack-sdk/pull/217.patch","issue_url":"https://api.github.com/repos/slackhq/node-slack-sdk/issues/217","number":217,"state":"closed","locked":false,"title":"Fix retry-after header name and add fallback value","user":{"login":"foiseworth","id":1270045,"avatar_url":"https://avatars.githubusercontent.com/u/1270045?v=3","gravatar_id":"","url":"https://api.github.com/users/foiseworth","html_url":"https://github.com/foiseworth","followers_url":"https://api.github.com/users/foiseworth/followers","following_url":"https://api.github.com/users/foiseworth/following{/other_user}","gists_url":"https://api.github.com/users/foiseworth/gists{/gist_id}","starred_url":"https://api.github.com/users/foiseworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foiseworth/subscriptions","organizations_url":"https://api.github.com/users/foiseworth/orgs","repos_url":"https://api.github.com/users/foiseworth/repos","events_url":"https://api.github.com/users/foiseworth/events{/privacy}","received_events_url":"https://api.github.com/users/foiseworth/received_events","type":"User","site_admin":false},"body":"When diagnosing an unrelated issue I noticed that our in-house bot was repeatedly trying requests after receiving a 429 response.\r\n\r\nThis was caused by the header ```Retry-After``` being instead ```retry-after``` and the previous code then passing NaN to setTimeout which caused it to be called immediately.\r\n\r\nI fixed it by renaming the header and then adding a fallback value if the header is not present. I also added a log message so that it is more obvious what is happening.","created_at":"2016-05-22T06:57:25Z","updated_at":"2016-05-22T22:01:25Z","closed_at":"2016-05-22T22:01:24Z","merged_at":"2016-05-22T22:01:24Z","merge_commit_sha":"f2d04bf318a8e2c11511a9e55e2d7bb397d42141","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/217/commits","review_comments_url":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/217/comments","review_comment_url":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/comments{/number}","comments_url":"https://api.github.com/repos/slackhq/node-slack-sdk/issues/217/comments","statuses_url":"https://api.github.com/repos/slackhq/node-slack-sdk/statuses/446a4fb728362e7073faa35efd9586cba9f49aeb","head":{"label":"foiseworth:fix-rate-limiting","ref":"fix-rate-limiting","sha":"446a4fb728362e7073faa35efd9586cba9f49aeb","user":{"login":"foiseworth","id":1270045,"avatar_url":"https://avatars.githubusercontent.com/u/1270045?v=3","gravatar_id":"","url":"https://api.github.com/users/foiseworth","html_url":"https://github.com/foiseworth","followers_url":"https://api.github.com/users/foiseworth/followers","following_url":"https://api.github.com/users/foiseworth/following{/other_user}","gists_url":"https://api.github.com/users/foiseworth/gists{/gist_id}","starred_url":"https://api.github.com/users/foiseworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foiseworth/subscriptions","organizations_url":"https://api.github.com/users/foiseworth/orgs","repos_url":"https://api.github.com/users/foiseworth/repos","events_url":"https://api.github.com/users/foiseworth/events{/privacy}","received_events_url":"https://api.github.com/users/foiseworth/received_events","type":"User","site_admin":false},"repo":{"id":59396681,"name":"node-slack-sdk","full_name":"foiseworth/node-slack-sdk","owner":{"login":"foiseworth","id":1270045,"avatar_url":"https://avatars.githubusercontent.com/u/1270045?v=3","gravatar_id":"","url":"https://api.github.com/users/foiseworth","html_url":"https://github.com/foiseworth","followers_url":"https://api.github.com/users/foiseworth/followers","following_url":"https://api.github.com/users/foiseworth/following{/other_user}","gists_url":"https://api.github.com/users/foiseworth/gists{/gist_id}","starred_url":"https://api.github.com/users/foiseworth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foiseworth/subscriptions","organizations_url":"https://api.github.com/users/foiseworth/orgs","repos_url":"https://api.github.com/users/foiseworth/repos","events_url":"https://api.github.com/users/foiseworth/events{/privacy}","received_events_url":"https://api.github.com/users/foiseworth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/foiseworth/node-slack-sdk","description":"Slack client library for node.js","fork":true,"url":"https://api.github.com/repos/foiseworth/node-slack-sdk","forks_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/forks","keys_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/teams","hooks_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/hooks","issue_events_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/events","assignees_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/tags","blobs_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/languages","stargazers_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/stargazers","contributors_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/contributors","subscribers_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/subscribers","subscription_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/subscription","commits_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/merges","archive_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/downloads","issues_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/labels{/name}","releases_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/foiseworth/node-slack-sdk/deployments","created_at":"2016-05-22T05:30:11Z","updated_at":"2016-05-22T05:30:13Z","pushed_at":"2016-05-22T06:54:35Z","git_url":"git://github.com/foiseworth/node-slack-sdk.git","ssh_url":"git@github.com:foiseworth/node-slack-sdk.git","clone_url":"https://github.com/foiseworth/node-slack-sdk.git","svn_url":"https://github.com/foiseworth/node-slack-sdk","homepage":"","size":337,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"slackhq:master","ref":"master","sha":"2233f74ba3000e3adc7e2fa1637b5ac7866244a3","user":{"login":"slackhq","id":6911160,"avatar_url":"https://avatars.githubusercontent.com/u/6911160?v=3","gravatar_id":"","url":"https://api.github.com/users/slackhq","html_url":"https://github.com/slackhq","followers_url":"https://api.github.com/users/slackhq/followers","following_url":"https://api.github.com/users/slackhq/following{/other_user}","gists_url":"https://api.github.com/users/slackhq/gists{/gist_id}","starred_url":"https://api.github.com/users/slackhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackhq/subscriptions","organizations_url":"https://api.github.com/users/slackhq/orgs","repos_url":"https://api.github.com/users/slackhq/repos","events_url":"https://api.github.com/users/slackhq/events{/privacy}","received_events_url":"https://api.github.com/users/slackhq/received_events","type":"Organization","site_admin":false},"repo":{"id":18117991,"name":"node-slack-sdk","full_name":"slackhq/node-slack-sdk","owner":{"login":"slackhq","id":6911160,"avatar_url":"https://avatars.githubusercontent.com/u/6911160?v=3","gravatar_id":"","url":"https://api.github.com/users/slackhq","html_url":"https://github.com/slackhq","followers_url":"https://api.github.com/users/slackhq/followers","following_url":"https://api.github.com/users/slackhq/following{/other_user}","gists_url":"https://api.github.com/users/slackhq/gists{/gist_id}","starred_url":"https://api.github.com/users/slackhq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slackhq/subscriptions","organizations_url":"https://api.github.com/users/slackhq/orgs","repos_url":"https://api.github.com/users/slackhq/repos","events_url":"https://api.github.com/users/slackhq/events{/privacy}","received_events_url":"https://api.github.com/users/slackhq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/slackhq/node-slack-sdk","description":"Slack client library for node.js","fork":false,"url":"https://api.github.com/repos/slackhq/node-slack-sdk","forks_url":"https://api.github.com/repos/slackhq/node-slack-sdk/forks","keys_url":"https://api.github.com/repos/slackhq/node-slack-sdk/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slackhq/node-slack-sdk/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slackhq/node-slack-sdk/teams","hooks_url":"https://api.github.com/repos/slackhq/node-slack-sdk/hooks","issue_events_url":"https://api.github.com/repos/slackhq/node-slack-sdk/issues/events{/number}","events_url":"https://api.github.com/repos/slackhq/node-slack-sdk/events","assignees_url":"https://api.github.com/repos/slackhq/node-slack-sdk/assignees{/user}","branches_url":"https://api.github.com/repos/slackhq/node-slack-sdk/branches{/branch}","tags_url":"https://api.github.com/repos/slackhq/node-slack-sdk/tags","blobs_url":"https://api.github.com/repos/slackhq/node-slack-sdk/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slackhq/node-slack-sdk/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slackhq/node-slack-sdk/git/refs{/sha}","trees_url":"https://api.github.com/repos/slackhq/node-slack-sdk/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slackhq/node-slack-sdk/statuses/{sha}","languages_url":"https://api.github.com/repos/slackhq/node-slack-sdk/languages","stargazers_url":"https://api.github.com/repos/slackhq/node-slack-sdk/stargazers","contributors_url":"https://api.github.com/repos/slackhq/node-slack-sdk/contributors","subscribers_url":"https://api.github.com/repos/slackhq/node-slack-sdk/subscribers","subscription_url":"https://api.github.com/repos/slackhq/node-slack-sdk/subscription","commits_url":"https://api.github.com/repos/slackhq/node-slack-sdk/commits{/sha}","git_commits_url":"https://api.github.com/repos/slackhq/node-slack-sdk/git/commits{/sha}","comments_url":"https://api.github.com/repos/slackhq/node-slack-sdk/comments{/number}","issue_comment_url":"https://api.github.com/repos/slackhq/node-slack-sdk/issues/comments{/number}","contents_url":"https://api.github.com/repos/slackhq/node-slack-sdk/contents/{+path}","compare_url":"https://api.github.com/repos/slackhq/node-slack-sdk/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slackhq/node-slack-sdk/merges","archive_url":"https://api.github.com/repos/slackhq/node-slack-sdk/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slackhq/node-slack-sdk/downloads","issues_url":"https://api.github.com/repos/slackhq/node-slack-sdk/issues{/number}","pulls_url":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls{/number}","milestones_url":"https://api.github.com/repos/slackhq/node-slack-sdk/milestones{/number}","notifications_url":"https://api.github.com/repos/slackhq/node-slack-sdk/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slackhq/node-slack-sdk/labels{/name}","releases_url":"https://api.github.com/repos/slackhq/node-slack-sdk/releases{/id}","deployments_url":"https://api.github.com/repos/slackhq/node-slack-sdk/deployments","created_at":"2014-03-25T21:56:50Z","updated_at":"2016-05-22T16:26:51Z","pushed_at":"2016-05-22T22:01:24Z","git_url":"git://github.com/slackhq/node-slack-sdk.git","ssh_url":"git@github.com:slackhq/node-slack-sdk.git","clone_url":"https://github.com/slackhq/node-slack-sdk.git","svn_url":"https://github.com/slackhq/node-slack-sdk","homepage":"","size":501,"stargazers_count":730,"watchers_count":730,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":310,"mirror_url":null,"open_issues_count":23,"forks":310,"open_issues":23,"watchers":730,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/217"},"html":{"href":"https://github.com/slackhq/node-slack-sdk/pull/217"},"issue":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/issues/217"},"comments":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/issues/217/comments"},"review_comments":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/217/comments"},"review_comment":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/pulls/217/commits"},"statuses":{"href":"https://api.github.com/repos/slackhq/node-slack-sdk/statuses/446a4fb728362e7073faa35efd9586cba9f49aeb"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"l12s","id":4584613,"avatar_url":"https://avatars.githubusercontent.com/u/4584613?v=3","gravatar_id":"","url":"https://api.github.com/users/l12s","html_url":"https://github.com/l12s","followers_url":"https://api.github.com/users/l12s/followers","following_url":"https://api.github.com/users/l12s/following{/other_user}","gists_url":"https://api.github.com/users/l12s/gists{/gist_id}","starred_url":"https://api.github.com/users/l12s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/l12s/subscriptions","organizations_url":"https://api.github.com/users/l12s/orgs","repos_url":"https://api.github.com/users/l12s/repos","events_url":"https://api.github.com/users/l12s/events{/privacy}","received_events_url":"https://api.github.com/users/l12s/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":4,"deletions":2,"changed_files":2}}
{"actor":{"display_login":"l12s"}}