Discussions
ocLazyLoad error promise result
over 8 years ago by chsarp
If error occurs during load, ocLazyLoad rejects the promise with following:
.error(function (err) {
deferred.reject(new Error('Unable to load template file "' + url + '": ' + err));
});
Here, original err result is converted to string and details such as status code are lost. I needed the status code to check 403 and handle the error. Is there any other way to access to status code?