{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/12605","labels_url":"https://api.github.com/repos/golang/go/issues/12605/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/12605/comments","events_url":"https://api.github.com/repos/golang/go/issues/12605/events","html_url":"https://github.com/golang/go/issues/12605","id":106240003,"number":12605,"title":"net/http/httputil: ReverseProxy should allow for the upstream errors to be customized","user":{"login":"mdp","id":2868,"avatar_url":"https://avatars.githubusercontent.com/u/2868?v=3","gravatar_id":"","url":"https://api.github.com/users/mdp","html_url":"https://github.com/mdp","followers_url":"https://api.github.com/users/mdp/followers","following_url":"https://api.github.com/users/mdp/following{/other_user}","gists_url":"https://api.github.com/users/mdp/gists{/gist_id}","starred_url":"https://api.github.com/users/mdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdp/subscriptions","organizations_url":"https://api.github.com/users/mdp/orgs","repos_url":"https://api.github.com/users/mdp/repos","events_url":"https://api.github.com/users/mdp/events{/privacy}","received_events_url":"https://api.github.com/users/mdp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/6","html_url":"https://github.com/golang/go/milestones/Unplanned","labels_url":"https://api.github.com/repos/golang/go/milestones/6/labels","id":1055141,"number":6,"title":"Unplanned","description":"No plan to fix in any specific release.\r\n","creator":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1123,"closed_issues":157,"state":"open","created_at":"2015-04-06T20:47:19Z","updated_at":"2015-11-12T13:02:02Z","due_on":"2099-12-31T05:00:00Z","closed_at":null},"comments":4,"created_at":"2015-09-13T21:11:23Z","updated_at":"2015-11-12T15:24:45Z","closed_at":null,"body":"Currently when the Transport of a ReverseProxy returns an error (such as from a bad upstream gateway) we return a `StatusInternalServerError` to the end user and close the client request [See reverse_proxy.go#L194](https://github.com/golang/go/blob/master/src/net/http/httputil/reverseproxy.go#L194-L199). It would be nice if this were easily customizable.\r\n\r\nOne option would be the let the developer specify an error handler function and handle the client connection themselves. This would also resolve #9864.\r\n\r\nSomething as simple as the following may be enough:\r\nhttps://github.com/golang/go/compare/0b5bcf53e...mdp:proxy_error\r\n\r\nIdeas? Another option would be to just have the developer write their own `Transport` and handle the error inside of that. \r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/156137187","html_url":"https://github.com/golang/go/issues/12605#issuecomment-156137187","issue_url":"https://api.github.com/repos/golang/go/issues/12605","id":156137187,"user":{"login":"bradfitz","id":2621,"avatar_url":"https://avatars.githubusercontent.com/u/2621?v=3","gravatar_id":"","url":"https://api.github.com/users/bradfitz","html_url":"https://github.com/bradfitz","followers_url":"https://api.github.com/users/bradfitz/followers","following_url":"https://api.github.com/users/bradfitz/following{/other_user}","gists_url":"https://api.github.com/users/bradfitz/gists{/gist_id}","starred_url":"https://api.github.com/users/bradfitz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradfitz/subscriptions","organizations_url":"https://api.github.com/users/bradfitz/orgs","repos_url":"https://api.github.com/users/bradfitz/repos","events_url":"https://api.github.com/users/bradfitz/events{/privacy}","received_events_url":"https://api.github.com/users/bradfitz/received_events","type":"User","site_admin":false},"created_at":"2015-11-12T15:24:45Z","updated_at":"2015-11-12T15:24:45Z","body":"Want to send a change?\r\nhttps://golang.org/doc/contribute.html"}}