{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/3336","repository_url":"https://api.github.com/repos/angular/angular.js","labels_url":"https://api.github.com/repos/angular/angular.js/issues/3336/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/3336/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/3336/events","html_url":"https://github.com/angular/angular.js/issues/3336","id":17185730,"number":3336,"title":"$http: unusable params passed to error handler when CORS preflight fails ","user":{"login":"DinoChiesa","id":253266,"avatar_url":"https://avatars.githubusercontent.com/u/253266?v=3","gravatar_id":"","url":"https://api.github.com/users/DinoChiesa","html_url":"https://github.com/DinoChiesa","followers_url":"https://api.github.com/users/DinoChiesa/followers","following_url":"https://api.github.com/users/DinoChiesa/following{/other_user}","gists_url":"https://api.github.com/users/DinoChiesa/gists{/gist_id}","starred_url":"https://api.github.com/users/DinoChiesa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DinoChiesa/subscriptions","organizations_url":"https://api.github.com/users/DinoChiesa/orgs","repos_url":"https://api.github.com/users/DinoChiesa/repos","events_url":"https://api.github.com/users/DinoChiesa/events{/privacy}","received_events_url":"https://api.github.com/users/DinoChiesa/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2013-07-24T22:58:39Z","updated_at":"2016-04-22T08:26:03Z","closed_at":"2013-07-25T10:00:40Z","body":"Suppose an http POST to a different origin. This implies CORS, including a CORS preflight exchange.  Now suppose the OPTIONS request returns a 500 error due to a server problem.  In this case the error handler gives \"\" for data and 0 for status. \r\n\r\nSeems wrong. \r\n\r\n\r\n    $http.post(myUrl, loginPayload, loginHttpConfig)\r\n      .success(function (response) {\r\n         ....\r\n      })\r\n      .error(function(data, status, headers, config) {\r\n        // In the event of a 500 response from the implicit OPTIONS\r\n        // request for CORS preflight, data =\"\", and status=0. This \r\n        // seems wrong.  \r\n      });\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/213323734","html_url":"https://github.com/angular/angular.js/issues/3336#issuecomment-213323734","issue_url":"https://api.github.com/repos/angular/angular.js/issues/3336","id":213323734,"user":{"login":"lucassp","id":198549,"avatar_url":"https://avatars.githubusercontent.com/u/198549?v=3","gravatar_id":"","url":"https://api.github.com/users/lucassp","html_url":"https://github.com/lucassp","followers_url":"https://api.github.com/users/lucassp/followers","following_url":"https://api.github.com/users/lucassp/following{/other_user}","gists_url":"https://api.github.com/users/lucassp/gists{/gist_id}","starred_url":"https://api.github.com/users/lucassp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucassp/subscriptions","organizations_url":"https://api.github.com/users/lucassp/orgs","repos_url":"https://api.github.com/users/lucassp/repos","events_url":"https://api.github.com/users/lucassp/events{/privacy}","received_events_url":"https://api.github.com/users/lucassp/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T08:26:03Z","updated_at":"2016-04-22T08:26:03Z","body":"@reecefenwick Well, I had a look here: https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS and tried various settings based on that."}}