4

I have an ajax request that occasionally dies with a variance of the following error:

GET http:someurl net::ERR_NAME_NOT_RESOLVED

jQuery.ajaxTransport.send jquery.js:8516

jQuery.extend.ajax jquery.js:8136

..

I'm making a JSONP request and its not catching at all in the error parameter. I'm clueless as to why, much less how to catch the error.

Any ideas?

Community
  • 1
  • 1
JDillon522
  • 19,046
  • 15
  • 47
  • 81
  • 2
    I think the DNS lookup is failing. Did you check if the `url` in your Ajax call is correct ? – Arkantos Mar 19 '15 at 18:23
  • Yeah its correct (I assume) because it works 80% of the rest of the time. I'm hitting an api and nothing is changing in the url other than querysting elements – JDillon522 Mar 19 '15 at 18:24
  • 2
    If you're just asking how to detect the error, this may be a duplicate of [JSONP request error handling](https://stackoverflow.com/questions/19035557/jsonp-request-error-handling). If you're asking why this error happens, it's probably a DNS issue either on your computer, the remote DNS server, or some misbehaving network component between you and the server. (In other words, your app isn't doing anything wrong, but something else is.) – apsillers Mar 19 '15 at 18:28
  • Yeah that helped at least catch the error and keep things from dying. I'll have to check with the api I'm working with and get it straightened out. Thanks – JDillon522 Mar 19 '15 at 19:00

0 Answers0