When an invalid url is passed to $.get, Chrome throws an NetworkError and no callbacks are called.
Expected result: Both fail() and always() should get called.
Code sample:
$.get('//example.com:80q').then(function () {
console.log('not called');
}).fail(function () {
console.log('not called');
}).always(function () {
console.log('not called');
});
Full error message:
XMLHttpRequest cannot load http://example.com:80q/. Cross origin requests are only supported for HTTP. jquery-2.0.2.js:7858
Uncaught NetworkError: A network error occurred. jquery-2.0.2.js:7321
Tested versions: 2.0.2, 2.0.3
Reproduced in: Chrome 31.0.1650.63
Couldn't reproduce in: IE10, Firefox 26
This does work as expected using jQuery 1.10.2, which makes me think it's an regression. http://jsfiddle.net/4FxSt/1/