{"action":"created","comment":{"url":"https://api.github.com/repos/go-kit/kit/pulls/comments/58215170","id":58215170,"diff_hunk":"@@ -0,0 +1,64 @@\n+package http_test\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\n+\t\"golang.org/x/net/context\"\n+\n+\ttransporthttp \"github.com/go-kit/kit/transport/http\"\n+\n+\t\"testing\"\n+)\n+\n+func TestClientEndpointEncodeError(t *testing.T) {\n+\tvar (\n+\t\tsampleErr = errors.New(\"Oh no, an error\")\n+\t\tenc       = func(r *http.Request, request interface{}) error {\n+\t\t\treturn sampleErr\n+\t\t}\n+\t\tdec = func(r *http.Response) (response interface{}, err error) {\n+\t\t\treturn nil, nil\n+\t\t}\n+\t)\n+\n+\tu := &url.URL{\n+\t\tScheme: \"https\",\n+\t\tHost:   \"localhost\",\n+\t\tPath:   \"/does/not/matter\",\n+\t}\n+\n+\tc := transporthttp.NewClient(\n+\t\t\"GET\",\n+\t\tu,\n+\t\tenc,\n+\t\tdec,\n+\t)\n+\n+\t_, err := c.Endpoint()(context.Background(), nil)\n+\tif err == nil {\n+\t\tt.Log(\"err == nil\")\n+\t\tt.Fail()","path":"transport/http/err_test.go","position":43,"original_position":43,"commit_id":"b381c8a37aa57795fccd6510ca9774f5205b5d3c","original_commit_id":"b381c8a37aa57795fccd6510ca9774f5205b5d3c","user":{"login":"Ayiga","id":3937524,"avatar_url":"https://avatars.githubusercontent.com/u/3937524?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayiga","html_url":"https://github.com/Ayiga","followers_url":"https://api.github.com/users/Ayiga/followers","following_url":"https://api.github.com/users/Ayiga/following{/other_user}","gists_url":"https://api.github.com/users/Ayiga/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayiga/subscriptions","organizations_url":"https://api.github.com/users/Ayiga/orgs","repos_url":"https://api.github.com/users/Ayiga/repos","events_url":"https://api.github.com/users/Ayiga/events{/privacy}","received_events_url":"https://api.github.com/users/Ayiga/received_events","type":"User","site_admin":false},"body":"Excellent","created_at":"2016-04-01T14:41:38Z","updated_at":"2016-04-01T14:41:38Z","html_url":"https://github.com/go-kit/kit/pull/232#discussion_r58215170","pull_request_url":"https://api.github.com/repos/go-kit/kit/pulls/232","_links":{"self":{"href":"https://api.github.com/repos/go-kit/kit/pulls/comments/58215170"},"html":{"href":"https://github.com/go-kit/kit/pull/232#discussion_r58215170"},"pull_request":{"href":"https://api.github.com/repos/go-kit/kit/pulls/232"}}},"pull_request":{"url":"https://api.github.com/repos/go-kit/kit/pulls/232","id":64944924,"html_url":"https://github.com/go-kit/kit/pull/232","diff_url":"https://github.com/go-kit/kit/pull/232.diff","patch_url":"https://github.com/go-kit/kit/pull/232.patch","issue_url":"https://api.github.com/repos/go-kit/kit/issues/232","number":232,"state":"open","locked":false,"title":"replace fmt.Errorf with Exported Err type","user":{"login":"Ayiga","id":3937524,"avatar_url":"https://avatars.githubusercontent.com/u/3937524?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayiga","html_url":"https://github.com/Ayiga","followers_url":"https://api.github.com/users/Ayiga/followers","following_url":"https://api.github.com/users/Ayiga/following{/other_user}","gists_url":"https://api.github.com/users/Ayiga/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayiga/subscriptions","organizations_url":"https://api.github.com/users/Ayiga/orgs","repos_url":"https://api.github.com/users/Ayiga/repos","events_url":"https://api.github.com/users/Ayiga/events{/privacy}","received_events_url":"https://api.github.com/users/Ayiga/received_events","type":"User","site_admin":false},"body":"This PR references issue https://github.com/go-kit/kit/issues/231\r\n\r\nCreate a new Err type that is able to represent the domain of the\r\nerror, as well as maintain a reference to the underlying error for\r\nuser reference.\r\n\r\nAdd test to ensure that the error formats in a similar way to the\r\nprevious errors being returned.\r\n\r\nAdd test to ensure that the new Err type is being returned from\r\nClient.Endpoint when a failure occurs instead of an anonymous\r\nerrors.New error.","created_at":"2016-04-01T13:33:03Z","updated_at":"2016-04-01T14:41:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47f1e259249b091a1d264525f1bbad6f83e44dd1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/go-kit/kit/pulls/232/commits","review_comments_url":"https://api.github.com/repos/go-kit/kit/pulls/232/comments","review_comment_url":"https://api.github.com/repos/go-kit/kit/pulls/comments{/number}","comments_url":"https://api.github.com/repos/go-kit/kit/issues/232/comments","statuses_url":"https://api.github.com/repos/go-kit/kit/statuses/b381c8a37aa57795fccd6510ca9774f5205b5d3c","head":{"label":"Ayiga:master","ref":"master","sha":"b381c8a37aa57795fccd6510ca9774f5205b5d3c","user":{"login":"Ayiga","id":3937524,"avatar_url":"https://avatars.githubusercontent.com/u/3937524?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayiga","html_url":"https://github.com/Ayiga","followers_url":"https://api.github.com/users/Ayiga/followers","following_url":"https://api.github.com/users/Ayiga/following{/other_user}","gists_url":"https://api.github.com/users/Ayiga/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayiga/subscriptions","organizations_url":"https://api.github.com/users/Ayiga/orgs","repos_url":"https://api.github.com/users/Ayiga/repos","events_url":"https://api.github.com/users/Ayiga/events{/privacy}","received_events_url":"https://api.github.com/users/Ayiga/received_events","type":"User","site_admin":false},"repo":{"id":55233061,"name":"kit","full_name":"Ayiga/kit","owner":{"login":"Ayiga","id":3937524,"avatar_url":"https://avatars.githubusercontent.com/u/3937524?v=3","gravatar_id":"","url":"https://api.github.com/users/Ayiga","html_url":"https://github.com/Ayiga","followers_url":"https://api.github.com/users/Ayiga/followers","following_url":"https://api.github.com/users/Ayiga/following{/other_user}","gists_url":"https://api.github.com/users/Ayiga/gists{/gist_id}","starred_url":"https://api.github.com/users/Ayiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ayiga/subscriptions","organizations_url":"https://api.github.com/users/Ayiga/orgs","repos_url":"https://api.github.com/users/Ayiga/repos","events_url":"https://api.github.com/users/Ayiga/events{/privacy}","received_events_url":"https://api.github.com/users/Ayiga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ayiga/kit","description":"A standard library for microservices.","fork":true,"url":"https://api.github.com/repos/Ayiga/kit","forks_url":"https://api.github.com/repos/Ayiga/kit/forks","keys_url":"https://api.github.com/repos/Ayiga/kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ayiga/kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ayiga/kit/teams","hooks_url":"https://api.github.com/repos/Ayiga/kit/hooks","issue_events_url":"https://api.github.com/repos/Ayiga/kit/issues/events{/number}","events_url":"https://api.github.com/repos/Ayiga/kit/events","assignees_url":"https://api.github.com/repos/Ayiga/kit/assignees{/user}","branches_url":"https://api.github.com/repos/Ayiga/kit/branches{/branch}","tags_url":"https://api.github.com/repos/Ayiga/kit/tags","blobs_url":"https://api.github.com/repos/Ayiga/kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ayiga/kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ayiga/kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ayiga/kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ayiga/kit/statuses/{sha}","languages_url":"https://api.github.com/repos/Ayiga/kit/languages","stargazers_url":"https://api.github.com/repos/Ayiga/kit/stargazers","contributors_url":"https://api.github.com/repos/Ayiga/kit/contributors","subscribers_url":"https://api.github.com/repos/Ayiga/kit/subscribers","subscription_url":"https://api.github.com/repos/Ayiga/kit/subscription","commits_url":"https://api.github.com/repos/Ayiga/kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ayiga/kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ayiga/kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ayiga/kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ayiga/kit/contents/{+path}","compare_url":"https://api.github.com/repos/Ayiga/kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ayiga/kit/merges","archive_url":"https://api.github.com/repos/Ayiga/kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ayiga/kit/downloads","issues_url":"https://api.github.com/repos/Ayiga/kit/issues{/number}","pulls_url":"https://api.github.com/repos/Ayiga/kit/pulls{/number}","milestones_url":"https://api.github.com/repos/Ayiga/kit/milestones{/number}","notifications_url":"https://api.github.com/repos/Ayiga/kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ayiga/kit/labels{/name}","releases_url":"https://api.github.com/repos/Ayiga/kit/releases{/id}","deployments_url":"https://api.github.com/repos/Ayiga/kit/deployments","created_at":"2016-04-01T13:07:11Z","updated_at":"2016-04-01T13:07:13Z","pushed_at":"2016-04-01T13:30:41Z","git_url":"git://github.com/Ayiga/kit.git","ssh_url":"git@github.com:Ayiga/kit.git","clone_url":"https://github.com/Ayiga/kit.git","svn_url":"https://github.com/Ayiga/kit","homepage":"http://gokit.io","size":4624,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"go-kit:master","ref":"master","sha":"f2622b97da066cf274990ab46a68213e4d213265","user":{"login":"go-kit","id":10981023,"avatar_url":"https://avatars.githubusercontent.com/u/10981023?v=3","gravatar_id":"","url":"https://api.github.com/users/go-kit","html_url":"https://github.com/go-kit","followers_url":"https://api.github.com/users/go-kit/followers","following_url":"https://api.github.com/users/go-kit/following{/other_user}","gists_url":"https://api.github.com/users/go-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/go-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-kit/subscriptions","organizations_url":"https://api.github.com/users/go-kit/orgs","repos_url":"https://api.github.com/users/go-kit/repos","events_url":"https://api.github.com/users/go-kit/events{/privacy}","received_events_url":"https://api.github.com/users/go-kit/received_events","type":"Organization","site_admin":false},"repo":{"id":30215630,"name":"kit","full_name":"go-kit/kit","owner":{"login":"go-kit","id":10981023,"avatar_url":"https://avatars.githubusercontent.com/u/10981023?v=3","gravatar_id":"","url":"https://api.github.com/users/go-kit","html_url":"https://github.com/go-kit","followers_url":"https://api.github.com/users/go-kit/followers","following_url":"https://api.github.com/users/go-kit/following{/other_user}","gists_url":"https://api.github.com/users/go-kit/gists{/gist_id}","starred_url":"https://api.github.com/users/go-kit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/go-kit/subscriptions","organizations_url":"https://api.github.com/users/go-kit/orgs","repos_url":"https://api.github.com/users/go-kit/repos","events_url":"https://api.github.com/users/go-kit/events{/privacy}","received_events_url":"https://api.github.com/users/go-kit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/go-kit/kit","description":"A standard library for microservices.","fork":false,"url":"https://api.github.com/repos/go-kit/kit","forks_url":"https://api.github.com/repos/go-kit/kit/forks","keys_url":"https://api.github.com/repos/go-kit/kit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/go-kit/kit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/go-kit/kit/teams","hooks_url":"https://api.github.com/repos/go-kit/kit/hooks","issue_events_url":"https://api.github.com/repos/go-kit/kit/issues/events{/number}","events_url":"https://api.github.com/repos/go-kit/kit/events","assignees_url":"https://api.github.com/repos/go-kit/kit/assignees{/user}","branches_url":"https://api.github.com/repos/go-kit/kit/branches{/branch}","tags_url":"https://api.github.com/repos/go-kit/kit/tags","blobs_url":"https://api.github.com/repos/go-kit/kit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/go-kit/kit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/go-kit/kit/git/refs{/sha}","trees_url":"https://api.github.com/repos/go-kit/kit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/go-kit/kit/statuses/{sha}","languages_url":"https://api.github.com/repos/go-kit/kit/languages","stargazers_url":"https://api.github.com/repos/go-kit/kit/stargazers","contributors_url":"https://api.github.com/repos/go-kit/kit/contributors","subscribers_url":"https://api.github.com/repos/go-kit/kit/subscribers","subscription_url":"https://api.github.com/repos/go-kit/kit/subscription","commits_url":"https://api.github.com/repos/go-kit/kit/commits{/sha}","git_commits_url":"https://api.github.com/repos/go-kit/kit/git/commits{/sha}","comments_url":"https://api.github.com/repos/go-kit/kit/comments{/number}","issue_comment_url":"https://api.github.com/repos/go-kit/kit/issues/comments{/number}","contents_url":"https://api.github.com/repos/go-kit/kit/contents/{+path}","compare_url":"https://api.github.com/repos/go-kit/kit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/go-kit/kit/merges","archive_url":"https://api.github.com/repos/go-kit/kit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/go-kit/kit/downloads","issues_url":"https://api.github.com/repos/go-kit/kit/issues{/number}","pulls_url":"https://api.github.com/repos/go-kit/kit/pulls{/number}","milestones_url":"https://api.github.com/repos/go-kit/kit/milestones{/number}","notifications_url":"https://api.github.com/repos/go-kit/kit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/go-kit/kit/labels{/name}","releases_url":"https://api.github.com/repos/go-kit/kit/releases{/id}","deployments_url":"https://api.github.com/repos/go-kit/kit/deployments","created_at":"2015-02-03T00:01:19Z","updated_at":"2016-04-01T05:03:12Z","pushed_at":"2016-04-01T13:39:24Z","git_url":"git://github.com/go-kit/kit.git","ssh_url":"git@github.com:go-kit/kit.git","clone_url":"https://github.com/go-kit/kit.git","svn_url":"https://github.com/go-kit/kit","homepage":"http://gokit.io","size":7747,"stargazers_count":3718,"watchers_count":3718,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":272,"mirror_url":null,"open_issues_count":18,"forks":272,"open_issues":18,"watchers":3718,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/go-kit/kit/pulls/232"},"html":{"href":"https://github.com/go-kit/kit/pull/232"},"issue":{"href":"https://api.github.com/repos/go-kit/kit/issues/232"},"comments":{"href":"https://api.github.com/repos/go-kit/kit/issues/232/comments"},"review_comments":{"href":"https://api.github.com/repos/go-kit/kit/pulls/232/comments"},"review_comment":{"href":"https://api.github.com/repos/go-kit/kit/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/go-kit/kit/pulls/232/commits"},"statuses":{"href":"https://api.github.com/repos/go-kit/kit/statuses/b381c8a37aa57795fccd6510ca9774f5205b5d3c"}}}}