title: jQuery AJAX returns 200 OK status, but errors. How can I view details of error?
body: <p>I have the following jQuery:</p>
  
  <pre><code>var fn = {
      Load: function () {
          $(".myclass input.Submit").click(function (e) {
              var _IsValid = fn.IsValid();
              if (_IsValid == false) {
                  e.preventDefault();
              }
              //Popup displays message fine if "return false;" is
              //called here but then obviously never posts back.
          });
      }
  , IsValid: function () {
  
      var _IsValid = true;
  $.ajax({
         url: "/myURL"
         , type: 'POST'
         , contentType: 'application/json; charset=utf-8'
          , data: JSON.stringify({ Barcode: $barcode.val(), Email: $email.val() })
          , dataType: 'json'
         , success: function (data) {
            var array = eval(data);
            if (array[0] == 0) {
              _IsValid = false;
              ShowPopup(array[1]);
            }
           }
         , error: function (xhr, status, error) {
  
           }
      });
     return _IsValid;
   }
  }
  </code></pre>
  
  <p>AJAX response is <code>200 OK</code>, but the <code>success</code> function is not being ran. Instead it seems to be running the <code>error</code> function.</p>
  
  <p>The script is being ran as an click event listener for an ASP.NET ImageButton. If <code>_IsValid==false</code>, then <code>e.preventDefault()</code> is invoked to prevent postback.</p>
  
  <p>What's strange is that if I add return false to the end of my event listener function, this code runs the <code>success</code> function.</p>
  
  <p>How can I find out what is causing this to error so that I can resolve it?</p>