{"action":"created","issue":{"url":"https://api.github.com/repos/google/go-github/issues/344","repository_url":"https://api.github.com/repos/google/go-github","labels_url":"https://api.github.com/repos/google/go-github/issues/344/labels{/name}","comments_url":"https://api.github.com/repos/google/go-github/issues/344/comments","events_url":"https://api.github.com/repos/google/go-github/issues/344/events","html_url":"https://github.com/google/go-github/pull/344","id":150197255,"number":344,"title":"Correctly handle API errors when downloading Release Assets","user":{"login":"rodaine","id":1268580,"avatar_url":"https://avatars.githubusercontent.com/u/1268580?v=3","gravatar_id":"","url":"https://api.github.com/users/rodaine","html_url":"https://github.com/rodaine","followers_url":"https://api.github.com/users/rodaine/followers","following_url":"https://api.github.com/users/rodaine/following{/other_user}","gists_url":"https://api.github.com/users/rodaine/gists{/gist_id}","starred_url":"https://api.github.com/users/rodaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodaine/subscriptions","organizations_url":"https://api.github.com/users/rodaine/orgs","repos_url":"https://api.github.com/users/rodaine/repos","events_url":"https://api.github.com/users/rodaine/events{/privacy}","received_events_url":"https://api.github.com/users/rodaine/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/go-github/labels/lgtm","name":"lgtm","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-04-21T21:37:31Z","updated_at":"2016-04-21T22:36:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/google/go-github/pulls/344","html_url":"https://github.com/google/go-github/pull/344","diff_url":"https://github.com/google/go-github/pull/344.diff","patch_url":"https://github.com/google/go-github/pull/344.patch"},"body":"If `RepositoriesService.DownloadReleaseAsset` encounters an error from the GitHub API (e.g., 404 Not Found), The error would not be returned by the method and instead the error payload would be delivered as the `io.ReadCloser`. This patch resolves this with `CheckResponse`.\r\n\r\nFixes #343\r\n\r\n/cc @willnorris (thanks for the help!)"},"comment":{"url":"https://api.github.com/repos/google/go-github/issues/comments/213145348","html_url":"https://github.com/google/go-github/pull/344#issuecomment-213145348","issue_url":"https://api.github.com/repos/google/go-github/issues/344","id":213145348,"user":{"login":"willnorris","id":1112,"avatar_url":"https://avatars.githubusercontent.com/u/1112?v=3","gravatar_id":"","url":"https://api.github.com/users/willnorris","html_url":"https://github.com/willnorris","followers_url":"https://api.github.com/users/willnorris/followers","following_url":"https://api.github.com/users/willnorris/following{/other_user}","gists_url":"https://api.github.com/users/willnorris/gists{/gist_id}","starred_url":"https://api.github.com/users/willnorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willnorris/subscriptions","organizations_url":"https://api.github.com/users/willnorris/orgs","repos_url":"https://api.github.com/users/willnorris/repos","events_url":"https://api.github.com/users/willnorris/events{/privacy}","received_events_url":"https://api.github.com/users/willnorris/received_events","type":"User","site_admin":false},"created_at":"2016-04-21T22:36:11Z","updated_at":"2016-04-21T22:36:11Z","body":"👍 "}}