Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

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

Closed
pkyeck opened this Issue · 2 comments

2 participants

@pkyeck

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 issue from a commit
@mislav mislav $.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
b788839
@mislav mislav closed this in b788839
@mislav
Collaborator

Fixed!

@pkyeck

great. thanks.

@lopper lopper referenced this issue from a commit in buddydvd/zepto
@mislav mislav $.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
2c5146c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.