{"action":"created","comment":{"url":"https://api.github.com/repos/ironSource/atom-node/pulls/comments/93431708","pull_request_review_id":13958237,"id":93431708,"diff_hunk":"@@ -104,19 +103,22 @@ module.exports = class Request {\n           return Promise.reject(err);\n         }\n         logger.error(err);\n-        return Promise.reject({message: 'Connection Problem', status: 400});\n+        return Promise.reject({message: 'Connection Problem', status: 500});\n       });\n   }\n \n   health(endpoint) {\n-    /* istanbul ignore next */\n+    if (endpoint.slice(-1) == '/') {\n+      endpoint=endpoint.slice(0, -1)\n+    }\n     let options = {\n       url: endpoint + '/health',\n       headers: this.headers,\n       json: true\n     };\n     return this._fetch('get', options)\n       .spread(function (response, body) {\n+\n         if (response.statusCode >= 400) {\n           return Promise.reject({message: \"Atom API is down\", status: response.statusCode});","path":"code/src/lib/request.class.js","position":31,"original_position":31,"commit_id":"00c4aa37dcf468c9440736f718755bd383ea85cc","original_commit_id":"00c4aa37dcf468c9440736f718755bd383ea85cc","user":{"login":"Ohadbasan","id":2110558,"avatar_url":"https://avatars.githubusercontent.com/u/2110558?v=3","gravatar_id":"","url":"https://api.github.com/users/Ohadbasan","html_url":"https://github.com/Ohadbasan","followers_url":"https://api.github.com/users/Ohadbasan/followers","following_url":"https://api.github.com/users/Ohadbasan/following{/other_user}","gists_url":"https://api.github.com/users/Ohadbasan/gists{/gist_id}","starred_url":"https://api.github.com/users/Ohadbasan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ohadbasan/subscriptions","organizations_url":"https://api.github.com/users/Ohadbasan/orgs","repos_url":"https://api.github.com/users/Ohadbasan/repos","events_url":"https://api.github.com/users/Ohadbasan/events{/privacy}","received_events_url":"https://api.github.com/users/Ohadbasan/received_events","type":"User","site_admin":false},"body":"How about \"client error\"?\r\n","created_at":"2016-12-21T12:46:37Z","updated_at":"2016-12-21T12:46:37Z","html_url":"https://github.com/ironSource/atom-node/pull/7#discussion_r93431708","pull_request_url":"https://api.github.com/repos/ironSource/atom-node/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/ironSource/atom-node/pulls/comments/93431708"},"html":{"href":"https://github.com/ironSource/atom-node/pull/7#discussion_r93431708"},"pull_request":{"href":"https://api.github.com/repos/ironSource/atom-node/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/ironSource/atom-node/pulls/7","id":98608834,"html_url":"https://github.com/ironSource/atom-node/pull/7","diff_url":"https://github.com/ironSource/atom-node/pull/7.diff","patch_url":"https://github.com/ironSource/atom-node/pull/7.patch","issue_url":"https://api.github.com/repos/ironSource/atom-node/issues/7","number":7,"state":"open","locked":false,"title":"fix(retry)","user":{"login":"Ohadbasan","id":2110558,"avatar_url":"https://avatars.githubusercontent.com/u/2110558?v=3","gravatar_id":"","url":"https://api.github.com/users/Ohadbasan","html_url":"https://github.com/Ohadbasan","followers_url":"https://api.github.com/users/Ohadbasan/followers","following_url":"https://api.github.com/users/Ohadbasan/following{/other_user}","gists_url":"https://api.github.com/users/Ohadbasan/gists{/gist_id}","starred_url":"https://api.github.com/users/Ohadbasan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ohadbasan/subscriptions","organizations_url":"https://api.github.com/users/Ohadbasan/orgs","repos_url":"https://api.github.com/users/Ohadbasan/repos","events_url":"https://api.github.com/users/Ohadbasan/events{/privacy}","received_events_url":"https://api.github.com/users/Ohadbasan/received_events","type":"User","site_admin":false},"body":"PutEvents got params by reference and mutated it, hence the behavior was\r\ninconsistent between retries.","created_at":"2016-12-19T17:43:36Z","updated_at":"2016-12-21T12:46:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1e3d6d19962a19eac2c0eb9c254a3119fdf1dcc9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ironSource/atom-node/pulls/7/commits","review_comments_url":"https://api.github.com/repos/ironSource/atom-node/pulls/7/comments","review_comment_url":"https://api.github.com/repos/ironSource/atom-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ironSource/atom-node/issues/7/comments","statuses_url":"https://api.github.com/repos/ironSource/atom-node/statuses/00c4aa37dcf468c9440736f718755bd383ea85cc","head":{"label":"Ohadbasan:master","ref":"master","sha":"00c4aa37dcf468c9440736f718755bd383ea85cc","user":{"login":"Ohadbasan","id":2110558,"avatar_url":"https://avatars.githubusercontent.com/u/2110558?v=3","gravatar_id":"","url":"https://api.github.com/users/Ohadbasan","html_url":"https://github.com/Ohadbasan","followers_url":"https://api.github.com/users/Ohadbasan/followers","following_url":"https://api.github.com/users/Ohadbasan/following{/other_user}","gists_url":"https://api.github.com/users/Ohadbasan/gists{/gist_id}","starred_url":"https://api.github.com/users/Ohadbasan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ohadbasan/subscriptions","organizations_url":"https://api.github.com/users/Ohadbasan/orgs","repos_url":"https://api.github.com/users/Ohadbasan/repos","events_url":"https://api.github.com/users/Ohadbasan/events{/privacy}","received_events_url":"https://api.github.com/users/Ohadbasan/received_events","type":"User","site_admin":false},"repo":{"id":76872094,"name":"atom-node","full_name":"Ohadbasan/atom-node","owner":{"login":"Ohadbasan","id":2110558,"avatar_url":"https://avatars.githubusercontent.com/u/2110558?v=3","gravatar_id":"","url":"https://api.github.com/users/Ohadbasan","html_url":"https://github.com/Ohadbasan","followers_url":"https://api.github.com/users/Ohadbasan/followers","following_url":"https://api.github.com/users/Ohadbasan/following{/other_user}","gists_url":"https://api.github.com/users/Ohadbasan/gists{/gist_id}","starred_url":"https://api.github.com/users/Ohadbasan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ohadbasan/subscriptions","organizations_url":"https://api.github.com/users/Ohadbasan/orgs","repos_url":"https://api.github.com/users/Ohadbasan/repos","events_url":"https://api.github.com/users/Ohadbasan/events{/privacy}","received_events_url":"https://api.github.com/users/Ohadbasan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ohadbasan/atom-node","description":"ironSource.atom SDK for Node","fork":true,"url":"https://api.github.com/repos/Ohadbasan/atom-node","forks_url":"https://api.github.com/repos/Ohadbasan/atom-node/forks","keys_url":"https://api.github.com/repos/Ohadbasan/atom-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ohadbasan/atom-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ohadbasan/atom-node/teams","hooks_url":"https://api.github.com/repos/Ohadbasan/atom-node/hooks","issue_events_url":"https://api.github.com/repos/Ohadbasan/atom-node/issues/events{/number}","events_url":"https://api.github.com/repos/Ohadbasan/atom-node/events","assignees_url":"https://api.github.com/repos/Ohadbasan/atom-node/assignees{/user}","branches_url":"https://api.github.com/repos/Ohadbasan/atom-node/branches{/branch}","tags_url":"https://api.github.com/repos/Ohadbasan/atom-node/tags","blobs_url":"https://api.github.com/repos/Ohadbasan/atom-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ohadbasan/atom-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ohadbasan/atom-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ohadbasan/atom-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ohadbasan/atom-node/statuses/{sha}","languages_url":"https://api.github.com/repos/Ohadbasan/atom-node/languages","stargazers_url":"https://api.github.com/repos/Ohadbasan/atom-node/stargazers","contributors_url":"https://api.github.com/repos/Ohadbasan/atom-node/contributors","subscribers_url":"https://api.github.com/repos/Ohadbasan/atom-node/subscribers","subscription_url":"https://api.github.com/repos/Ohadbasan/atom-node/subscription","commits_url":"https://api.github.com/repos/Ohadbasan/atom-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ohadbasan/atom-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ohadbasan/atom-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ohadbasan/atom-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ohadbasan/atom-node/contents/{+path}","compare_url":"https://api.github.com/repos/Ohadbasan/atom-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ohadbasan/atom-node/merges","archive_url":"https://api.github.com/repos/Ohadbasan/atom-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ohadbasan/atom-node/downloads","issues_url":"https://api.github.com/repos/Ohadbasan/atom-node/issues{/number}","pulls_url":"https://api.github.com/repos/Ohadbasan/atom-node/pulls{/number}","milestones_url":"https://api.github.com/repos/Ohadbasan/atom-node/milestones{/number}","notifications_url":"https://api.github.com/repos/Ohadbasan/atom-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ohadbasan/atom-node/labels{/name}","releases_url":"https://api.github.com/repos/Ohadbasan/atom-node/releases{/id}","deployments_url":"https://api.github.com/repos/Ohadbasan/atom-node/deployments","created_at":"2016-12-19T15:10:07Z","updated_at":"2016-12-19T15:10:09Z","pushed_at":"2016-12-21T10:56:51Z","git_url":"git://github.com/Ohadbasan/atom-node.git","ssh_url":"git@github.com:Ohadbasan/atom-node.git","clone_url":"https://github.com/Ohadbasan/atom-node.git","svn_url":"https://github.com/Ohadbasan/atom-node","homepage":"http://www.ironsrc.com/data-flow-management/","size":275,"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":"ironSource:master","ref":"master","sha":"3179ffcb0ec61eae4b083e2dd230c906b44bb365","user":{"login":"ironSource","id":4834262,"avatar_url":"https://avatars.githubusercontent.com/u/4834262?v=3","gravatar_id":"","url":"https://api.github.com/users/ironSource","html_url":"https://github.com/ironSource","followers_url":"https://api.github.com/users/ironSource/followers","following_url":"https://api.github.com/users/ironSource/following{/other_user}","gists_url":"https://api.github.com/users/ironSource/gists{/gist_id}","starred_url":"https://api.github.com/users/ironSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironSource/subscriptions","organizations_url":"https://api.github.com/users/ironSource/orgs","repos_url":"https://api.github.com/users/ironSource/repos","events_url":"https://api.github.com/users/ironSource/events{/privacy}","received_events_url":"https://api.github.com/users/ironSource/received_events","type":"Organization","site_admin":false},"repo":{"id":59470224,"name":"atom-node","full_name":"ironSource/atom-node","owner":{"login":"ironSource","id":4834262,"avatar_url":"https://avatars.githubusercontent.com/u/4834262?v=3","gravatar_id":"","url":"https://api.github.com/users/ironSource","html_url":"https://github.com/ironSource","followers_url":"https://api.github.com/users/ironSource/followers","following_url":"https://api.github.com/users/ironSource/following{/other_user}","gists_url":"https://api.github.com/users/ironSource/gists{/gist_id}","starred_url":"https://api.github.com/users/ironSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironSource/subscriptions","organizations_url":"https://api.github.com/users/ironSource/orgs","repos_url":"https://api.github.com/users/ironSource/repos","events_url":"https://api.github.com/users/ironSource/events{/privacy}","received_events_url":"https://api.github.com/users/ironSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ironSource/atom-node","description":"ironSource.atom SDK for Node","fork":false,"url":"https://api.github.com/repos/ironSource/atom-node","forks_url":"https://api.github.com/repos/ironSource/atom-node/forks","keys_url":"https://api.github.com/repos/ironSource/atom-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ironSource/atom-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ironSource/atom-node/teams","hooks_url":"https://api.github.com/repos/ironSource/atom-node/hooks","issue_events_url":"https://api.github.com/repos/ironSource/atom-node/issues/events{/number}","events_url":"https://api.github.com/repos/ironSource/atom-node/events","assignees_url":"https://api.github.com/repos/ironSource/atom-node/assignees{/user}","branches_url":"https://api.github.com/repos/ironSource/atom-node/branches{/branch}","tags_url":"https://api.github.com/repos/ironSource/atom-node/tags","blobs_url":"https://api.github.com/repos/ironSource/atom-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ironSource/atom-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ironSource/atom-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/ironSource/atom-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ironSource/atom-node/statuses/{sha}","languages_url":"https://api.github.com/repos/ironSource/atom-node/languages","stargazers_url":"https://api.github.com/repos/ironSource/atom-node/stargazers","contributors_url":"https://api.github.com/repos/ironSource/atom-node/contributors","subscribers_url":"https://api.github.com/repos/ironSource/atom-node/subscribers","subscription_url":"https://api.github.com/repos/ironSource/atom-node/subscription","commits_url":"https://api.github.com/repos/ironSource/atom-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/ironSource/atom-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/ironSource/atom-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/ironSource/atom-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/ironSource/atom-node/contents/{+path}","compare_url":"https://api.github.com/repos/ironSource/atom-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ironSource/atom-node/merges","archive_url":"https://api.github.com/repos/ironSource/atom-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ironSource/atom-node/downloads","issues_url":"https://api.github.com/repos/ironSource/atom-node/issues{/number}","pulls_url":"https://api.github.com/repos/ironSource/atom-node/pulls{/number}","milestones_url":"https://api.github.com/repos/ironSource/atom-node/milestones{/number}","notifications_url":"https://api.github.com/repos/ironSource/atom-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ironSource/atom-node/labels{/name}","releases_url":"https://api.github.com/repos/ironSource/atom-node/releases{/id}","deployments_url":"https://api.github.com/repos/ironSource/atom-node/deployments","created_at":"2016-05-23T09:34:59Z","updated_at":"2016-10-31T12:24:24Z","pushed_at":"2016-12-21T10:56:53Z","git_url":"git://github.com/ironSource/atom-node.git","ssh_url":"git@github.com:ironSource/atom-node.git","clone_url":"https://github.com/ironSource/atom-node.git","svn_url":"https://github.com/ironSource/atom-node","homepage":"http://www.ironsrc.com/data-flow-management/","size":266,"stargazers_count":13,"watchers_count":13,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":13,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ironSource/atom-node/pulls/7"},"html":{"href":"https://github.com/ironSource/atom-node/pull/7"},"issue":{"href":"https://api.github.com/repos/ironSource/atom-node/issues/7"},"comments":{"href":"https://api.github.com/repos/ironSource/atom-node/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/ironSource/atom-node/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/ironSource/atom-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ironSource/atom-node/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/ironSource/atom-node/statuses/00c4aa37dcf468c9440736f718755bd383ea85cc"}}}}
{"actor":{"display_login":"Ohadbasan"}}