Please sign in to comment.
Treat xhr.status==0 as error not success
For reasons mysterious to me, a network connection error on .ajax is treated as 'success' callback by jQuery, but with an xhr.status==0. Catch that in 'success' callback and treat it as error instead. This situation can happen for instance if the applicaiton the url is pointed at is down, and the server just doesn't accept a connection there.
- Loading branch information...