title: Catch error if DNS error in $.ajax call?
body: <p>How do I catch error if the server that I'm calling is down (maybe because of a DNS problem)?</p>
  
  <p>This doesn't do it:</p>
  
  <pre><code>error: function( req, status, err ) {
      console.log( 'server unreachable', status, err );
    },
  </code></pre>
  
  <p>If I use a url that I know won't resolve in the call to simulate I get no error.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>This seems to work in some quick and dirty test cases:</p>
  
  <pre><code>timeout: 3000,
      error: function(x, t, m) {
          if(t==="timeout") {
              alert("got timeout so probably unreachable");
          } 
  </code></pre>
  
  <p>But, is that really the best way to approach?</p>