AJAX call not failing or succeeding

149 views Asked by At

I am trying to get data from this AJAX call, the error function is called, but I can't figure out why? Debugging me shows that the GET works correctly.

Is there something I'm missing from here?

The API key can be regenerated, not a security risk for me.

$.ajax(
{
    type: "GET",
    dataType: "jsonp",
    url: "https://api.challonge.com/v1/tournaments/christchurch_ranbats_1_melee/participants.json?api_key=UgPJ6Le4jATPLCvRpm0YirZDCX6JvMp13I6MmEVW",
    success: function (data) {
        console.log(data);
        alert("It works");
    },
    error: function () {
        alert("Sorry, could not fetch the data.");
    }
});
1

There are 1 answers

4
clickbait On BEST ANSWER

What version of jQuery are you using? Later versions of jQuery use error instead of failure.

I ran your code, and it said the client blocked the request.