ajax abort() triggers error callback w/ wrong textStatus "error" #649

Closed
pkyeck opened this Issue Nov 19, 2012 · 2 comments

Comments

Projects
None yet
2 participants

pkyeck commented Nov 19, 2012

if I abort an ajax call with

var req = $.ajax({
    url: "/long_lasting_response",
    success: function( data ) { // ... },
    error: function( xhr, textStatus, errorThrown ) {
      console.log("textStatus: " + textStatus);
    }
});
req.abort();

the error-callback is called but the textStatus is "error" not "aborted".
would be great to adopt jQuery behavior.

@mislav mislav closed this in b788839 Nov 25, 2012

Collaborator

mislav commented Nov 25, 2012

Fixed!

pkyeck commented Nov 27, 2012

great. thanks.

lopper added a commit to buddydvd/zepto that referenced this issue Apr 24, 2013

$.ajax error callback correctly reports "abort" status
Before it was just "error".

Assumes that an XHR status of "0" means that the request has
been aborted.

Fixes #649
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment