{"action":"created","issue":{"url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/issues/31","repository_url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise","labels_url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/issues/31/comments","events_url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/issues/31/events","html_url":"https://github.com/KyleAMathews/superagent-bluebird-promise/pull/31","id":105702216,"number":31,"title":"Add `catch` to Request prototype","user":{"login":"markdalgleish","id":696693,"avatar_url":"https://avatars.githubusercontent.com/u/696693?v=3","gravatar_id":"","url":"https://api.github.com/users/markdalgleish","html_url":"https://github.com/markdalgleish","followers_url":"https://api.github.com/users/markdalgleish/followers","following_url":"https://api.github.com/users/markdalgleish/following{/other_user}","gists_url":"https://api.github.com/users/markdalgleish/gists{/gist_id}","starred_url":"https://api.github.com/users/markdalgleish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markdalgleish/subscriptions","organizations_url":"https://api.github.com/users/markdalgleish/orgs","repos_url":"https://api.github.com/users/markdalgleish/repos","events_url":"https://api.github.com/users/markdalgleish/events{/privacy}","received_events_url":"https://api.github.com/users/markdalgleish/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-09T23:18:17Z","updated_at":"2016-03-02T04:30:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/pulls/31","html_url":"https://github.com/KyleAMathews/superagent-bluebird-promise/pull/31","diff_url":"https://github.com/KyleAMathews/superagent-bluebird-promise/pull/31.diff","patch_url":"https://github.com/KyleAMathews/superagent-bluebird-promise/pull/31.patch"},"body":"In our project, we've been tripped up a few times by the fact that the Request prototype doesn't have the standard `catch` promise method available.\r\n\r\nTo get around this, we've had to write `request.get(...).then().catch(function(error) { ... })` or `request.get(...).promise().catch(function(error) { ... })` instead, which is far from ideal.\r\n\r\nThis pull request adds `catch` to `Request.prototype`, so that the following code is valid:\r\n\r\n```js\r\nrequest.get(...).catch(function(error) { ... });\r\n```\r\n\r\nI propose that, for now, we draw the line at standard promise methods (`then` and `catch`), but we can revisit this decision in the future."},"comment":{"url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/issues/comments/191055583","html_url":"https://github.com/KyleAMathews/superagent-bluebird-promise/pull/31#issuecomment-191055583","issue_url":"https://api.github.com/repos/KyleAMathews/superagent-bluebird-promise/issues/31","id":191055583,"user":{"login":"sheeley","id":121681,"avatar_url":"https://avatars.githubusercontent.com/u/121681?v=3","gravatar_id":"","url":"https://api.github.com/users/sheeley","html_url":"https://github.com/sheeley","followers_url":"https://api.github.com/users/sheeley/followers","following_url":"https://api.github.com/users/sheeley/following{/other_user}","gists_url":"https://api.github.com/users/sheeley/gists{/gist_id}","starred_url":"https://api.github.com/users/sheeley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheeley/subscriptions","organizations_url":"https://api.github.com/users/sheeley/orgs","repos_url":"https://api.github.com/users/sheeley/repos","events_url":"https://api.github.com/users/sheeley/events{/privacy}","received_events_url":"https://api.github.com/users/sheeley/received_events","type":"User","site_admin":false},"created_at":"2016-03-02T04:30:46Z","updated_at":"2016-03-02T04:30:46Z","body":"This would be super useful @KyleAMathews, will you be merging?"}}