Bug Tracker

Opened 12 years ago

Last modified 10 years ago

#8173 closed bug

1.5 Ajax not triggering error for bad URL — at Version 1

Reported by: [email protected] Owned by: [email protected]
Priority: low Milestone: 1.next
Component: ajax Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by jitter)

This simple AJAX call includes a URL that doesn't exist. In 1.5 in Firefox it does not display the alert meaning the error is not being caught (or causes a runtime error in Firebug). In 1.4.4 it properly catches the error in the textStatus.

$('#cmdDetails').bind('click', function()
{
    $.ajax
    ({
        type: "GET",
        dataType: "json",
        url: "server/fakeurl.php",
        complete : function(data, textStatus, jqXHR)
        {
            alert(textStatus);
        }
    })
});

Change History (1)

comment:1 Changed 12 years ago by jitter

Component: unfiledajax
Description: modified (diff)
Owner: set to [email protected]
Priority: undecidedlow
Status: newpending

Thanks for taking the time to contribute to the jQuery project by writing a bug report!

After checking your report I made this live test case based on your description. I can't seem to reproduce the behavior you described, as I get an alert saying "error" in FF.

So please submit a reduced test case, which reproduces the issue you are experiencing, on http://jsfiddle.net. So that we can investigate this issue further. Also make sure to read the link given below, in order to provide a most useful bug report.


How to report bugs

Note: See TracTickets for help on using tickets.