If you're using jQuery:
$.ajax({
// ...
error: function(jqXHR, textStatus, errorThrown) {
console.log(errorThrown);
}
});
Question
I am doing an ajax post to a django view. Since I am not returning a page but data to my ajax call back, I do not get a stack trace. How do I print my errors in the view?
The error is happening when I do a save if that helps.
Solution
If you're using jQuery:
$.ajax({
// ...
error: function(jqXHR, textStatus, errorThrown) {
console.log(errorThrown);
}
});