try to get an error when calling ajax
$(document).ready(function() {
$("button").click(function() {
$.getJSON("https://www.bitstamp.net/api/eur_usd/", function(data) {
alert(data);
}
.error(function(xhr) {
alert(xhr)
})
);
});
});
Note. Xhr.responseText will give you an error stack trace, it will return in html format
source
share