My ajax calls typically go something like this:
$.ajax({
type: 'POST',
url: '/Controller/GoDoWhatever',
contentType: 'application/json;',
data: JSON.stringify(obj),
success: function (data) {
// all good
},
error: function (error) {
console.log(error);
}
});
What I'd like to know is when we do hit an error what is ok or not ok to do with error? Once code goes live the console.log only serves a purpose to a developer really imo. However, can potentially personal data brought back from the error say if I've wrote the controller in an insecure way. If there is a chance the error can give a nefarious user an edge then what should I be doing, not console.log at all or completely remove the error functionality? Hope I've explained this correctly, thanks in advance :)