Ticket #5080 (closed bug: invalid)
$.ajax 'error' and 'complete' callbacks ignore dataType.
|Reported by:||micah||Owned by:|
|Keywords:||ajax complete callback datatype||Cc:|
$.ajax will always pass the xhr to s.error and s.complete, without regard for the dataType argument (see http://dev.jquery.com/browser/trunk/jquery/src/ajax.js#L476).
I initially thought my code was screwy, as I expected the first argument of any callback to be the json response when dataType == 'json'. Is there a specific reason for this discrepancy in the API?