title: JQuery error option in $.ajax utility
body: <p>The documentation indicates that the error: option function will make available: XHR instance, a status message string (in this case always error) and an optional exception object returned from the XHR instance (Book: JQuery in Action)</p>
  
  <p>Using the following (in the $.ajax call) I was able to determine I had a "parsererror" and a "timeout" (since I added the timeout: option) error</p>
  
  <pre><code>error: function(request, error){}
  </code></pre>
  
  <p>What are other things you evaluate in the error option? do you include the optional exception object?</p>
  
  <p><strong>EDIT:</strong> one of the answers indicates all the return errors...learning more about what is of value (for debugging) in the XHR instance and exception object would be helpful</p>
  
  <p>This is a complete $.ajax call:</p>
  
  <pre><code>$.ajax({
   type: "post",
   url: "http://myServer/cgi-bin/broker" ,
   dataType: "text",
   data: {
   '_service' : 'myService',
   '_program' : 'myProgram',
   'start' : start,
   'end' : end
   },
   beforeSend: function() {
    $("#loading").removeClass("hide");
   },
   timeout: 5000,
   error: function(request,error) {
    $("#loading").addClass("hide");
    if (error == "timeout") {
     $("#error").append("The request timed out, please resubmit");
    }
    else {
     $("#error").append("ERROR: " + error);
    }
    },
    success: function(request) {
     $("#loading").addClass("hide");
     var t = eval( "(" + request + ")" ) ;
    } // End success
  }); // End ajax method
  </code></pre>
  
  <p>Thanks for the input</p>