{"action":"created","comment":{"url":"https://api.github.com/repos/square/rangeclient/pulls/comments/39063869","id":39063869,"diff_hunk":"@@ -37,6 +40,7 @@ def expand(arg)\n     http.use_ssl = @ssl\n     req = Net::HTTP::Get.new('/range/list?' + escaped_arg)\n     resp = http.request(req)\n+    raise QueryException.new(resp.body) unless resp.code == \"200\"","path":"lib/rangeclient.rb","position":14,"original_position":14,"commit_id":"ab71ac6c93bf9b30ad0a2f56815d80603541f52a","original_commit_id":"ab71ac6c93bf9b30ad0a2f56815d80603541f52a","user":{"login":"xaviershay","id":1714,"avatar_url":"https://avatars.githubusercontent.com/u/1714?v=3","gravatar_id":"","url":"https://api.github.com/users/xaviershay","html_url":"https://github.com/xaviershay","followers_url":"https://api.github.com/users/xaviershay/followers","following_url":"https://api.github.com/users/xaviershay/following{/other_user}","gists_url":"https://api.github.com/users/xaviershay/gists{/gist_id}","starred_url":"https://api.github.com/users/xaviershay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaviershay/subscriptions","organizations_url":"https://api.github.com/users/xaviershay/orgs","repos_url":"https://api.github.com/users/xaviershay/repos","events_url":"https://api.github.com/users/xaviershay/events{/privacy}","received_events_url":"https://api.github.com/users/xaviershay/received_events","type":"User","site_admin":false},"body":"nit: more canonical way to do this is `Net::HTTPSuccess === resp` (or `resp.is_a?(Net::HTTPSuccess)` .... they're effectively equivalent), which avoids the ugly 200-is-a-string issue.","created_at":"2015-09-09T16:17:58Z","updated_at":"2015-09-09T16:17:58Z","html_url":"https://github.com/square/rangeclient/pull/4#discussion_r39063869","pull_request_url":"https://api.github.com/repos/square/rangeclient/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/square/rangeclient/pulls/comments/39063869"},"html":{"href":"https://github.com/square/rangeclient/pull/4#discussion_r39063869"},"pull_request":{"href":"https://api.github.com/repos/square/rangeclient/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/square/rangeclient/pulls/4","id":44501377,"html_url":"https://github.com/square/rangeclient/pull/4","diff_url":"https://github.com/square/rangeclient/pull/4.diff","patch_url":"https://github.com/square/rangeclient/pull/4.patch","issue_url":"https://api.github.com/repos/square/rangeclient/issues/4","number":4,"state":"open","locked":false,"title":"Handle errors","user":{"login":"nwatson","id":236115,"avatar_url":"https://avatars.githubusercontent.com/u/236115?v=3","gravatar_id":"","url":"https://api.github.com/users/nwatson","html_url":"https://github.com/nwatson","followers_url":"https://api.github.com/users/nwatson/followers","following_url":"https://api.github.com/users/nwatson/following{/other_user}","gists_url":"https://api.github.com/users/nwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/nwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwatson/subscriptions","organizations_url":"https://api.github.com/users/nwatson/orgs","repos_url":"https://api.github.com/users/nwatson/repos","events_url":"https://api.github.com/users/nwatson/events{/privacy}","received_events_url":"https://api.github.com/users/nwatson/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-09T01:21:34Z","updated_at":"2015-09-09T16:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c240314db08fff16ef457a8c9f3d078017fef311","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/rangeclient/pulls/4/commits","review_comments_url":"https://api.github.com/repos/square/rangeclient/pulls/4/comments","review_comment_url":"https://api.github.com/repos/square/rangeclient/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/rangeclient/issues/4/comments","statuses_url":"https://api.github.com/repos/square/rangeclient/statuses/ab71ac6c93bf9b30ad0a2f56815d80603541f52a","head":{"label":"nwatson:handle_errors","ref":"handle_errors","sha":"ab71ac6c93bf9b30ad0a2f56815d80603541f52a","user":{"login":"nwatson","id":236115,"avatar_url":"https://avatars.githubusercontent.com/u/236115?v=3","gravatar_id":"","url":"https://api.github.com/users/nwatson","html_url":"https://github.com/nwatson","followers_url":"https://api.github.com/users/nwatson/followers","following_url":"https://api.github.com/users/nwatson/following{/other_user}","gists_url":"https://api.github.com/users/nwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/nwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwatson/subscriptions","organizations_url":"https://api.github.com/users/nwatson/orgs","repos_url":"https://api.github.com/users/nwatson/repos","events_url":"https://api.github.com/users/nwatson/events{/privacy}","received_events_url":"https://api.github.com/users/nwatson/received_events","type":"User","site_admin":false},"repo":{"id":35247002,"name":"rangeclient","full_name":"nwatson/rangeclient","owner":{"login":"nwatson","id":236115,"avatar_url":"https://avatars.githubusercontent.com/u/236115?v=3","gravatar_id":"","url":"https://api.github.com/users/nwatson","html_url":"https://github.com/nwatson","followers_url":"https://api.github.com/users/nwatson/followers","following_url":"https://api.github.com/users/nwatson/following{/other_user}","gists_url":"https://api.github.com/users/nwatson/gists{/gist_id}","starred_url":"https://api.github.com/users/nwatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwatson/subscriptions","organizations_url":"https://api.github.com/users/nwatson/orgs","repos_url":"https://api.github.com/users/nwatson/repos","events_url":"https://api.github.com/users/nwatson/events{/privacy}","received_events_url":"https://api.github.com/users/nwatson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nwatson/rangeclient","description":"Ruby client for range","fork":true,"url":"https://api.github.com/repos/nwatson/rangeclient","forks_url":"https://api.github.com/repos/nwatson/rangeclient/forks","keys_url":"https://api.github.com/repos/nwatson/rangeclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nwatson/rangeclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nwatson/rangeclient/teams","hooks_url":"https://api.github.com/repos/nwatson/rangeclient/hooks","issue_events_url":"https://api.github.com/repos/nwatson/rangeclient/issues/events{/number}","events_url":"https://api.github.com/repos/nwatson/rangeclient/events","assignees_url":"https://api.github.com/repos/nwatson/rangeclient/assignees{/user}","branches_url":"https://api.github.com/repos/nwatson/rangeclient/branches{/branch}","tags_url":"https://api.github.com/repos/nwatson/rangeclient/tags","blobs_url":"https://api.github.com/repos/nwatson/rangeclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nwatson/rangeclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nwatson/rangeclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/nwatson/rangeclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nwatson/rangeclient/statuses/{sha}","languages_url":"https://api.github.com/repos/nwatson/rangeclient/languages","stargazers_url":"https://api.github.com/repos/nwatson/rangeclient/stargazers","contributors_url":"https://api.github.com/repos/nwatson/rangeclient/contributors","subscribers_url":"https://api.github.com/repos/nwatson/rangeclient/subscribers","subscription_url":"https://api.github.com/repos/nwatson/rangeclient/subscription","commits_url":"https://api.github.com/repos/nwatson/rangeclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/nwatson/rangeclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/nwatson/rangeclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/nwatson/rangeclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/nwatson/rangeclient/contents/{+path}","compare_url":"https://api.github.com/repos/nwatson/rangeclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nwatson/rangeclient/merges","archive_url":"https://api.github.com/repos/nwatson/rangeclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nwatson/rangeclient/downloads","issues_url":"https://api.github.com/repos/nwatson/rangeclient/issues{/number}","pulls_url":"https://api.github.com/repos/nwatson/rangeclient/pulls{/number}","milestones_url":"https://api.github.com/repos/nwatson/rangeclient/milestones{/number}","notifications_url":"https://api.github.com/repos/nwatson/rangeclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nwatson/rangeclient/labels{/name}","releases_url":"https://api.github.com/repos/nwatson/rangeclient/releases{/id}","created_at":"2015-05-07T22:37:39Z","updated_at":"2015-05-07T22:37:39Z","pushed_at":"2015-09-09T01:21:07Z","git_url":"git://github.com/nwatson/rangeclient.git","ssh_url":"git@github.com:nwatson/rangeclient.git","clone_url":"https://github.com/nwatson/rangeclient.git","svn_url":"https://github.com/nwatson/rangeclient","homepage":null,"size":105,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"square:master","ref":"master","sha":"b0fb74a0679a0d4d8438ce4cc5f15b3ad922ee17","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":26508172,"name":"rangeclient","full_name":"square/rangeclient","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/rangeclient","description":"Ruby client for range","fork":false,"url":"https://api.github.com/repos/square/rangeclient","forks_url":"https://api.github.com/repos/square/rangeclient/forks","keys_url":"https://api.github.com/repos/square/rangeclient/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/rangeclient/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/rangeclient/teams","hooks_url":"https://api.github.com/repos/square/rangeclient/hooks","issue_events_url":"https://api.github.com/repos/square/rangeclient/issues/events{/number}","events_url":"https://api.github.com/repos/square/rangeclient/events","assignees_url":"https://api.github.com/repos/square/rangeclient/assignees{/user}","branches_url":"https://api.github.com/repos/square/rangeclient/branches{/branch}","tags_url":"https://api.github.com/repos/square/rangeclient/tags","blobs_url":"https://api.github.com/repos/square/rangeclient/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/rangeclient/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/rangeclient/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/rangeclient/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/rangeclient/statuses/{sha}","languages_url":"https://api.github.com/repos/square/rangeclient/languages","stargazers_url":"https://api.github.com/repos/square/rangeclient/stargazers","contributors_url":"https://api.github.com/repos/square/rangeclient/contributors","subscribers_url":"https://api.github.com/repos/square/rangeclient/subscribers","subscription_url":"https://api.github.com/repos/square/rangeclient/subscription","commits_url":"https://api.github.com/repos/square/rangeclient/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/rangeclient/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/rangeclient/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/rangeclient/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/rangeclient/contents/{+path}","compare_url":"https://api.github.com/repos/square/rangeclient/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/rangeclient/merges","archive_url":"https://api.github.com/repos/square/rangeclient/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/rangeclient/downloads","issues_url":"https://api.github.com/repos/square/rangeclient/issues{/number}","pulls_url":"https://api.github.com/repos/square/rangeclient/pulls{/number}","milestones_url":"https://api.github.com/repos/square/rangeclient/milestones{/number}","notifications_url":"https://api.github.com/repos/square/rangeclient/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/rangeclient/labels{/name}","releases_url":"https://api.github.com/repos/square/rangeclient/releases{/id}","created_at":"2014-11-11T22:37:32Z","updated_at":"2015-05-07T23:25:59Z","pushed_at":"2015-09-09T01:21:34Z","git_url":"git://github.com/square/rangeclient.git","ssh_url":"git@github.com:square/rangeclient.git","clone_url":"https://github.com/square/rangeclient.git","svn_url":"https://github.com/square/rangeclient","homepage":null,"size":281,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":2,"forks":2,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/rangeclient/pulls/4"},"html":{"href":"https://github.com/square/rangeclient/pull/4"},"issue":{"href":"https://api.github.com/repos/square/rangeclient/issues/4"},"comments":{"href":"https://api.github.com/repos/square/rangeclient/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/square/rangeclient/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/square/rangeclient/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/rangeclient/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/square/rangeclient/statuses/ab71ac6c93bf9b30ad0a2f56815d80603541f52a"}}}}