title: jQuery ajax call getting error response with status of 200
body: <p>I sent a jQuery ajax request to my express-powered node.js server, which processed it successfully and responded.  However, the response triggers the ajax <code>error</code> callback instead of the <code>success</code> callback (despite the status code being "200").  That was not what I was expecting.  ;o)  Here is my code:</p>
  
  <p>client.js:</p>
  
  <pre><code>$.ajax( {
      url: "/httpUpload",
      type: "POST",
      processData: false,
      contentType: false,
      dataType : "json",
      data: formData,
      success: function() {
          // Do stuff
      },
      error: function( error ) {
          console.error( "HttpUpload failed: " + error.responseText );
      }
  } );
  </code></pre>
  
  <p>server.js:</p>
  
  <pre><code>var express = require( "express" );
  var app = express();
  var server = require( "http" ).Server( app );
  var multipart = require('connect-multiparty');
  
  app.use( express.static( "public" ) );
  app.use( multipart() );
  
  app.post( "/httpUpload", function( req, res ) {
      console.log( "Received post request");
      res.send( "Done!" );
  }
  </code></pre>
  
  <p>The <code>error</code> object that I get in the ajax <code>error</code> callback looks like this:</p>
  
  <pre><code>{readyState: 4, responseText: "Done!", status: 200, statusText: "OK"}
  </code></pre>
  
  <p>Any idea why it's triggering the <code>error</code> callback?</p>