{"action":"created","issue":{"url":"https://api.github.com/repos/brendanhay/gogol/issues/18","repository_url":"https://api.github.com/repos/brendanhay/gogol","labels_url":"https://api.github.com/repos/brendanhay/gogol/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/brendanhay/gogol/issues/18/comments","events_url":"https://api.github.com/repos/brendanhay/gogol/issues/18/events","html_url":"https://github.com/brendanhay/gogol/issues/18","id":148505656,"number":18,"title":"Support for error handling with response body?","user":{"login":"mkscrg","id":471342,"avatar_url":"https://avatars.githubusercontent.com/u/471342?v=3","gravatar_id":"","url":"https://api.github.com/users/mkscrg","html_url":"https://github.com/mkscrg","followers_url":"https://api.github.com/users/mkscrg/followers","following_url":"https://api.github.com/users/mkscrg/following{/other_user}","gists_url":"https://api.github.com/users/mkscrg/gists{/gist_id}","starred_url":"https://api.github.com/users/mkscrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkscrg/subscriptions","organizations_url":"https://api.github.com/users/mkscrg/orgs","repos_url":"https://api.github.com/users/mkscrg/repos","events_url":"https://api.github.com/users/mkscrg/events{/privacy}","received_events_url":"https://api.github.com/users/mkscrg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-14T22:53:52Z","updated_at":"2016-04-14T23:49:16Z","closed_at":null,"body":"`gogol` doesn't offer much context for API errors right now, since it uses [`checkStatus`](https://github.com/brendanhay/gogol/blob/4592e14ab7d931bb0d87ac7a8b83790437900aa5/gogol/src/Network/Google/Internal/HTTP.hs#L83) to throw `ServiceError` on non-success response statuses. (And `checkStatus` doesn't have access to the response body.)\r\n\r\nIs this intentional, or a planned change in the future? It's hard to work with these APIs without any error context beyond the raw status code.\r\n\r\nThese libraries (`amazonka` etc) are amazing btw :+1::grinning::wrench:"},"comment":{"url":"https://api.github.com/repos/brendanhay/gogol/issues/comments/210207281","html_url":"https://github.com/brendanhay/gogol/issues/18#issuecomment-210207281","issue_url":"https://api.github.com/repos/brendanhay/gogol/issues/18","id":210207281,"user":{"login":"mkscrg","id":471342,"avatar_url":"https://avatars.githubusercontent.com/u/471342?v=3","gravatar_id":"","url":"https://api.github.com/users/mkscrg","html_url":"https://github.com/mkscrg","followers_url":"https://api.github.com/users/mkscrg/followers","following_url":"https://api.github.com/users/mkscrg/following{/other_user}","gists_url":"https://api.github.com/users/mkscrg/gists{/gist_id}","starred_url":"https://api.github.com/users/mkscrg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkscrg/subscriptions","organizations_url":"https://api.github.com/users/mkscrg/orgs","repos_url":"https://api.github.com/users/mkscrg/repos","events_url":"https://api.github.com/users/mkscrg/events{/privacy}","received_events_url":"https://api.github.com/users/mkscrg/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T23:49:16Z","updated_at":"2016-04-14T23:49:16Z","body":"To illustrate, here's a change we're playing with to get more error context: https://github.com/brendanhay/gogol/compare/brendanhay:4592e14...wagonhq:f889ed9"}}