title: How to capture the 500 error message using jquery?
body: <p>How can i capture the 500 error message using jquery? I want to keep on checking for the 500 error message for sometime until it changes and time out after 50 sec.</p>
  
  <p>I used the code below to try to capture and check the 500 error message but it doesnt seem to catch the 500 error message. I can see it in the firebug</p>
  
  <pre><code>$.ajax({
      statusCode: {
          500: function() {
              alert(" 500 data still loading");
              console.log('500 ');
          }
      }
  }); 
  </code></pre>