I'm making a call to a Twitter JSON feed, and when I pass an incorrect
username, jQuery's ajax complete method never gets called.

An example of a JSON response that causes complete not to be called
(nor error, nor success) is: 
http://twitter.com/users/show.json?screen_name=bhdjbhubeuhfbfbjfbjf

Here's my code:

$.ajax({
        type: "GET",
        url: "http://twitter.com/users/show.json";,
        cache: false,
        data: "screen_name=" + $('#account-id').val().replace(/^\s*|\s*$/
g,''),
        dataType: "jsonp",
        async: true,
        success: function(j){
                alert('success');
        },
        error: function(xhr, ajaxOptions, thrownError) {
                alert(xhr + ' ' + ajaxOptions + ' ' + thrownError);
        },
        complete: function() {
                alert('finished');
        }
});

Any ideas on why the complete method isn't getting called?

Shouldn't this always get called?

Thanks!

Reply via email to