How to get status code in Angularjs?
问题 We use aws and swagger, also we have a service with getData method var getData = () => { return $http({ method: 'GET', url: 'myURL', headers: { 'Authorization': 'token' } }); }; I'm trying to use it with bellow code dataservice.getData().then(response => { console.log(response) }) .catch((err) => { console.log(err)); }) And for good request (when I'm autorized) it works fine, I get my data, but then token is not valid I'm gettin error whitout status code in console Object {data: null, status: