{"action":"opened","number":289,"pull_request":{"url":"https://api.github.com/repos/haskell/network/pulls/289","id":160577077,"html_url":"https://github.com/haskell/network/pull/289","diff_url":"https://github.com/haskell/network/pull/289.diff","patch_url":"https://github.com/haskell/network/pull/289.patch","issue_url":"https://api.github.com/repos/haskell/network/issues/289","number":289,"state":"open","locked":false,"title":"Improve exception error messages for getAddrInfo and getNameInfo","user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars3.githubusercontent.com/u/1274145?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"body":"@develop7 ran into an issue with `yesod devel` (https://github.com/yesodweb/yesod/issues/1471) and got the following error message:\r\n\r\n```\r\ndevel.hs: Network.Socket.getAddrInfo: does not exist (Name or service not known)\r\n```\r\n\r\nIt would be useful to have a more detailed error message to aid in debugging this exception. The new message looks like this:\r\n\r\n```\r\n> getAddrInfo Nothing (Just \"127.0.0.1\") (Just \"foo\")\r\n*** Exception: Network.Socket.getAddrInfo (called with preferred socket type/protocol: Nothing, host name: Just \"127.0.0.1\", service name: Just \"foo\"): does not exist (nodename nor servname provided, or not known)\r\n```\r\n\r\nI think a more verbose error message is well worth it, especially since these kind of lower-level, underlying issues can be hard to debug.\r\n\r\n(I added a similar error message for `getNameInfo` since it was right there)","created_at":"2017-12-30T03:13:35Z","updated_at":"2017-12-30T03:13:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/haskell/network/pulls/289/commits","review_comments_url":"https://api.github.com/repos/haskell/network/pulls/289/comments","review_comment_url":"https://api.github.com/repos/haskell/network/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haskell/network/issues/289/comments","statuses_url":"https://api.github.com/repos/haskell/network/statuses/20b144d575d737b1fd09f7a9453eb515f356b26c","head":{"label":"MaxGabriel:improveErrorMessages","ref":"improveErrorMessages","sha":"20b144d575d737b1fd09f7a9453eb515f356b26c","user":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars3.githubusercontent.com/u/1274145?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"repo":{"id":115769625,"name":"network","full_name":"MaxGabriel/network","owner":{"login":"MaxGabriel","id":1274145,"avatar_url":"https://avatars3.githubusercontent.com/u/1274145?v=4","gravatar_id":"","url":"https://api.github.com/users/MaxGabriel","html_url":"https://github.com/MaxGabriel","followers_url":"https://api.github.com/users/MaxGabriel/followers","following_url":"https://api.github.com/users/MaxGabriel/following{/other_user}","gists_url":"https://api.github.com/users/MaxGabriel/gists{/gist_id}","starred_url":"https://api.github.com/users/MaxGabriel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaxGabriel/subscriptions","organizations_url":"https://api.github.com/users/MaxGabriel/orgs","repos_url":"https://api.github.com/users/MaxGabriel/repos","events_url":"https://api.github.com/users/MaxGabriel/events{/privacy}","received_events_url":"https://api.github.com/users/MaxGabriel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaxGabriel/network","description":"Low-level networking interface","fork":true,"url":"https://api.github.com/repos/MaxGabriel/network","forks_url":"https://api.github.com/repos/MaxGabriel/network/forks","keys_url":"https://api.github.com/repos/MaxGabriel/network/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaxGabriel/network/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaxGabriel/network/teams","hooks_url":"https://api.github.com/repos/MaxGabriel/network/hooks","issue_events_url":"https://api.github.com/repos/MaxGabriel/network/issues/events{/number}","events_url":"https://api.github.com/repos/MaxGabriel/network/events","assignees_url":"https://api.github.com/repos/MaxGabriel/network/assignees{/user}","branches_url":"https://api.github.com/repos/MaxGabriel/network/branches{/branch}","tags_url":"https://api.github.com/repos/MaxGabriel/network/tags","blobs_url":"https://api.github.com/repos/MaxGabriel/network/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaxGabriel/network/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaxGabriel/network/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaxGabriel/network/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaxGabriel/network/statuses/{sha}","languages_url":"https://api.github.com/repos/MaxGabriel/network/languages","stargazers_url":"https://api.github.com/repos/MaxGabriel/network/stargazers","contributors_url":"https://api.github.com/repos/MaxGabriel/network/contributors","subscribers_url":"https://api.github.com/repos/MaxGabriel/network/subscribers","subscription_url":"https://api.github.com/repos/MaxGabriel/network/subscription","commits_url":"https://api.github.com/repos/MaxGabriel/network/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaxGabriel/network/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaxGabriel/network/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaxGabriel/network/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaxGabriel/network/contents/{+path}","compare_url":"https://api.github.com/repos/MaxGabriel/network/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaxGabriel/network/merges","archive_url":"https://api.github.com/repos/MaxGabriel/network/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaxGabriel/network/downloads","issues_url":"https://api.github.com/repos/MaxGabriel/network/issues{/number}","pulls_url":"https://api.github.com/repos/MaxGabriel/network/pulls{/number}","milestones_url":"https://api.github.com/repos/MaxGabriel/network/milestones{/number}","notifications_url":"https://api.github.com/repos/MaxGabriel/network/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaxGabriel/network/labels{/name}","releases_url":"https://api.github.com/repos/MaxGabriel/network/releases{/id}","deployments_url":"https://api.github.com/repos/MaxGabriel/network/deployments","created_at":"2017-12-30T02:56:16Z","updated_at":"2017-12-30T02:56:18Z","pushed_at":"2017-12-30T03:13:15Z","git_url":"git://github.com/MaxGabriel/network.git","ssh_url":"git@github.com:MaxGabriel/network.git","clone_url":"https://github.com/MaxGabriel/network.git","svn_url":"https://github.com/MaxGabriel/network","homepage":"","size":1232,"stargazers_count":0,"watchers_count":0,"language":"Haskell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"haskell:master","ref":"master","sha":"1a512cfedcf74608fb1073b8316fc4ad78a3a2a4","user":{"login":"haskell","id":450574,"avatar_url":"https://avatars1.githubusercontent.com/u/450574?v=4","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"repo":{"id":1030046,"name":"network","full_name":"haskell/network","owner":{"login":"haskell","id":450574,"avatar_url":"https://avatars1.githubusercontent.com/u/450574?v=4","gravatar_id":"","url":"https://api.github.com/users/haskell","html_url":"https://github.com/haskell","followers_url":"https://api.github.com/users/haskell/followers","following_url":"https://api.github.com/users/haskell/following{/other_user}","gists_url":"https://api.github.com/users/haskell/gists{/gist_id}","starred_url":"https://api.github.com/users/haskell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haskell/subscriptions","organizations_url":"https://api.github.com/users/haskell/orgs","repos_url":"https://api.github.com/users/haskell/repos","events_url":"https://api.github.com/users/haskell/events{/privacy}","received_events_url":"https://api.github.com/users/haskell/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/haskell/network","description":"Low-level networking interface","fork":false,"url":"https://api.github.com/repos/haskell/network","forks_url":"https://api.github.com/repos/haskell/network/forks","keys_url":"https://api.github.com/repos/haskell/network/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haskell/network/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haskell/network/teams","hooks_url":"https://api.github.com/repos/haskell/network/hooks","issue_events_url":"https://api.github.com/repos/haskell/network/issues/events{/number}","events_url":"https://api.github.com/repos/haskell/network/events","assignees_url":"https://api.github.com/repos/haskell/network/assignees{/user}","branches_url":"https://api.github.com/repos/haskell/network/branches{/branch}","tags_url":"https://api.github.com/repos/haskell/network/tags","blobs_url":"https://api.github.com/repos/haskell/network/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haskell/network/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haskell/network/git/refs{/sha}","trees_url":"https://api.github.com/repos/haskell/network/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haskell/network/statuses/{sha}","languages_url":"https://api.github.com/repos/haskell/network/languages","stargazers_url":"https://api.github.com/repos/haskell/network/stargazers","contributors_url":"https://api.github.com/repos/haskell/network/contributors","subscribers_url":"https://api.github.com/repos/haskell/network/subscribers","subscription_url":"https://api.github.com/repos/haskell/network/subscription","commits_url":"https://api.github.com/repos/haskell/network/commits{/sha}","git_commits_url":"https://api.github.com/repos/haskell/network/git/commits{/sha}","comments_url":"https://api.github.com/repos/haskell/network/comments{/number}","issue_comment_url":"https://api.github.com/repos/haskell/network/issues/comments{/number}","contents_url":"https://api.github.com/repos/haskell/network/contents/{+path}","compare_url":"https://api.github.com/repos/haskell/network/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haskell/network/merges","archive_url":"https://api.github.com/repos/haskell/network/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haskell/network/downloads","issues_url":"https://api.github.com/repos/haskell/network/issues{/number}","pulls_url":"https://api.github.com/repos/haskell/network/pulls{/number}","milestones_url":"https://api.github.com/repos/haskell/network/milestones{/number}","notifications_url":"https://api.github.com/repos/haskell/network/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haskell/network/labels{/name}","releases_url":"https://api.github.com/repos/haskell/network/releases{/id}","deployments_url":"https://api.github.com/repos/haskell/network/deployments","created_at":"2010-10-27T21:37:32Z","updated_at":"2017-12-28T03:11:47Z","pushed_at":"2017-12-29T05:23:24Z","git_url":"git://github.com/haskell/network.git","ssh_url":"git@github.com:haskell/network.git","clone_url":"https://github.com/haskell/network.git","svn_url":"https://github.com/haskell/network","homepage":"","size":1232,"stargazers_count":147,"watchers_count":147,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":112,"mirror_url":null,"archived":false,"open_issues_count":21,"license":{"key":"bsd-3-clause","name":"BSD 3-clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":112,"open_issues":21,"watchers":147,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haskell/network/pulls/289"},"html":{"href":"https://github.com/haskell/network/pull/289"},"issue":{"href":"https://api.github.com/repos/haskell/network/issues/289"},"comments":{"href":"https://api.github.com/repos/haskell/network/issues/289/comments"},"review_comments":{"href":"https://api.github.com/repos/haskell/network/pulls/289/comments"},"review_comment":{"href":"https://api.github.com/repos/haskell/network/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haskell/network/pulls/289/commits"},"statuses":{"href":"https://api.github.com/repos/haskell/network/statuses/20b144d575d737b1fd09f7a9453eb515f356b26c"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":22,"deletions":2,"changed_files":1}}
{"actor":{"display_login":"MaxGabriel"}}