Reputation: 3
topBarClient.request(settings).then(
function (data) {
console.log("data",data);
showTaskData(data);
if (data.status === 200) {
onSuccess(JSON.parse(data.responseText));
} else {
onFailure(data.status);
}
},
function (response) {
console.log("error", response);
onFailure(response.status);
}
);
onFailure is working but not able to get the error out Is there a way to test this locally?
Upvotes: 0
Views: 282
Reputation: 3
console.log
works fine, if it's not working then it is not getting called probably due to some exception in the line above console.log
.
If you face any problem you can render html component like div to dislplay the text for debugging purpose.
Upvotes: 0