Bug Tracker

Opened 10 years ago

Closed 10 years ago

#12611 closed bug (invalid)

ajax() calls success under certain failure conditions

Reported by: [email protected] Owned by: [email protected]
Priority: undecided Milestone: None
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:


I have a page which uses ajax() to load some JSON like so..

    $.ajax({'url' : 'array-status.json', 'dataType' : 'json', 'data' : args,
	    'success' : updatestatus,
	    'error' : function(jqXHR, textStatus, errorThrown) {
		$("#errortxt").html("Unable to load antenna data: " + jqXHR.status + " (" + jqXHR.statusText + ")");
	    'cache' : false

If I kill the web server (a flask instance) I find that the success call back is executed. If the backend is alive but returns an error it behaves as I expect (ie the error call back is executed).

The jqXHR looks like..

abort: function () {
onabort: null
onerror: null
onload: null
onloadend: null
onloadstart: null
onprogress: null
onreadystatechange: function () {}
readyState: 4
response: ""
responseText: ""
responseType: ""
responseXML: null
status: 0
statusText: ""
upload: XMLHttpRequestUpload
withCredentials: false
__proto__: XMLHttpRequest

This is using Chrome 22.0.1229.64 beta.

Change History (2)

comment:1 Changed 10 years ago by dmethvin

Owner: set to [email protected]
Status: newpending

Can you try it on a released Chrome browser and see if the problem is still there? If not you should definitely be reporting this to the Chrome team and not here. Also, a complete test case would help.

comment:2 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.