{"action":"created","issue":{"url":"https://api.github.com/repos/request/request-promise/issues/120","repository_url":"https://api.github.com/repos/request/request-promise","labels_url":"https://api.github.com/repos/request/request-promise/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/request/request-promise/issues/120/comments","events_url":"https://api.github.com/repos/request/request-promise/issues/120/events","html_url":"https://github.com/request/request-promise/issues/120","id":157756680,"number":120,"title":"Handling network errors","user":{"login":"tejasmanohar","id":5959235,"avatar_url":"https://avatars.githubusercontent.com/u/5959235?v=3","gravatar_id":"","url":"https://api.github.com/users/tejasmanohar","html_url":"https://github.com/tejasmanohar","followers_url":"https://api.github.com/users/tejasmanohar/followers","following_url":"https://api.github.com/users/tejasmanohar/following{/other_user}","gists_url":"https://api.github.com/users/tejasmanohar/gists{/gist_id}","starred_url":"https://api.github.com/users/tejasmanohar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejasmanohar/subscriptions","organizations_url":"https://api.github.com/users/tejasmanohar/orgs","repos_url":"https://api.github.com/users/tejasmanohar/repos","events_url":"https://api.github.com/users/tejasmanohar/events{/privacy}","received_events_url":"https://api.github.com/users/tejasmanohar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-31T19:59:07Z","updated_at":"2016-05-31T20:22:55Z","closed_at":null,"body":"How should we handle network errors like ECONNRESET via request-promise? It appears as if this library has wrapped all errors to RequestError and thus, removed fields often used for failure identification like `.code`"},"comment":{"url":"https://api.github.com/repos/request/request-promise/issues/comments/222808503","html_url":"https://github.com/request/request-promise/issues/120#issuecomment-222808503","issue_url":"https://api.github.com/repos/request/request-promise/issues/120","id":222808503,"user":{"login":"analog-nico","id":1407390,"avatar_url":"https://avatars.githubusercontent.com/u/1407390?v=3","gravatar_id":"","url":"https://api.github.com/users/analog-nico","html_url":"https://github.com/analog-nico","followers_url":"https://api.github.com/users/analog-nico/followers","following_url":"https://api.github.com/users/analog-nico/following{/other_user}","gists_url":"https://api.github.com/users/analog-nico/gists{/gist_id}","starred_url":"https://api.github.com/users/analog-nico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/analog-nico/subscriptions","organizations_url":"https://api.github.com/users/analog-nico/orgs","repos_url":"https://api.github.com/users/analog-nico/repos","events_url":"https://api.github.com/users/analog-nico/events{/privacy}","received_events_url":"https://api.github.com/users/analog-nico/received_events","type":"User","site_admin":false},"created_at":"2016-05-31T20:22:55Z","updated_at":"2016-05-31T20:22:55Z","body":"Have a look at the [definition of the RequestError](https://github.com/request/request-promise/blob/master/lib/errors.js#L4-L19). the `.cause` is the `Error` you already know from using Request with a callback.\r\n\r\nAlso, the general error handling is documented [here](https://github.com/request/request-promise#rejected-promises-and-the-simple-option).\r\n\r\nDoes this answer you question?"}}
{"actor":{"display_login":"analog-nico"}}