title: Prevent Unhandled jQuery AJAX Error
body: <p>I know how to receive server data or error. There are many ways. For example:</p>
  
  <pre><code>$.ajax({
      type: "get",
      url: "/widgets/",
      success: function (data, text) {
          console.log('this is a data');
      },
      error: function (request, status, error) {
          console.log('this is an error');
      }
  });
  </code></pre>
  
  <p>Please see this image:</p>
  
  <p><img src="https://i.stack.imgur.com/Soc3o.png" alt="result in chrome developer console"></p>
  
  <p>I have my error function and I do what I need there.
  How can I prevent error in the first line.
  I have tested 4xx and 5xx errors but no difference.
  I know that end user does not see this error when developer console is hidden.</p>
  
  <p>I need this to design an API.
  I know that I can send 200 responses from server with an additional argument that show that this is an error or a success result.</p>
  
  <p>But if I can send 4xx or 5xx responses then there is no need to extra argument.
  This way has some additional gains for me. For example I can apply success result to my client side models without worry about additional args.</p>
  
  <p>Thank you</p>