{"action":"created","issue":{"url":"https://api.github.com/repos/sinonjs/sinon/issues/1031","repository_url":"https://api.github.com/repos/sinonjs/sinon","labels_url":"https://api.github.com/repos/sinonjs/sinon/issues/1031/labels{/name}","comments_url":"https://api.github.com/repos/sinonjs/sinon/issues/1031/comments","events_url":"https://api.github.com/repos/sinonjs/sinon/issues/1031/events","html_url":"https://github.com/sinonjs/sinon/pull/1031","id":149285469,"number":1031,"title":"Use event loaded instead of error event for code like 403, 500, etc.","user":{"login":"vietnogi","id":1030770,"avatar_url":"https://avatars.githubusercontent.com/u/1030770?v=3","gravatar_id":"","url":"https://api.github.com/users/vietnogi","html_url":"https://github.com/vietnogi","followers_url":"https://api.github.com/users/vietnogi/followers","following_url":"https://api.github.com/users/vietnogi/following{/other_user}","gists_url":"https://api.github.com/users/vietnogi/gists{/gist_id}","starred_url":"https://api.github.com/users/vietnogi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vietnogi/subscriptions","organizations_url":"https://api.github.com/users/vietnogi/orgs","repos_url":"https://api.github.com/users/vietnogi/repos","events_url":"https://api.github.com/users/vietnogi/events{/privacy}","received_events_url":"https://api.github.com/users/vietnogi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2016-04-18T22:10:33Z","updated_at":"2016-05-03T19:17:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sinonjs/sinon/pulls/1031","html_url":"https://github.com/sinonjs/sinon/pull/1031","diff_url":"https://github.com/sinonjs/sinon/pull/1031.diff","patch_url":"https://github.com/sinonjs/sinon/pull/1031.patch"},"body":"#### Purpose (TL;DR) - mandatory\r\nCodes like 403 and 500 are loaded events not error events.\r\n\r\n#### Background (Problem in detail)  - optional\r\nAxios.js would not reject a promise for 403 error codes.\r\n\r\n#### Solution  - optional\r\nChange to use loaded event instead of error event.\r\n\r\n#### How to verify - mandatory\r\n1. Check out this branch (see github instructions below)\r\n2. `npm install`\r\n3. tbd\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sinonjs/sinon/issues/comments/216636140","html_url":"https://github.com/sinonjs/sinon/pull/1031#issuecomment-216636140","issue_url":"https://api.github.com/repos/sinonjs/sinon/issues/1031","id":216636140,"user":{"login":"Standard8","id":520844,"avatar_url":"https://avatars.githubusercontent.com/u/520844?v=3","gravatar_id":"","url":"https://api.github.com/users/Standard8","html_url":"https://github.com/Standard8","followers_url":"https://api.github.com/users/Standard8/followers","following_url":"https://api.github.com/users/Standard8/following{/other_user}","gists_url":"https://api.github.com/users/Standard8/gists{/gist_id}","starred_url":"https://api.github.com/users/Standard8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Standard8/subscriptions","organizations_url":"https://api.github.com/users/Standard8/orgs","repos_url":"https://api.github.com/users/Standard8/repos","events_url":"https://api.github.com/users/Standard8/events{/privacy}","received_events_url":"https://api.github.com/users/Standard8/received_events","type":"User","site_admin":false},"created_at":"2016-05-03T19:17:42Z","updated_at":"2016-05-03T19:17:42Z","body":"> How would one identify and trigger an error at all? It will be impossible after this change.\r\n\r\nI believe it was impossible before - I think I remember looking at it a while ago, and then unfortunately forgetting to file an issue for the `error` method.Should we split that out to a different PR/Issue?"}}