Why am I not receiving any error notifications even when there is an error message in the response object?
$.ajax(settings).done(function (response) {
if ( "error_message" in response ) {
console.log(response);
$.notify("Existing appointment", "error");
}
else {
$.notify("Appointment added", {"status":"success"});
}
$('.modal.in').modal('hide')
table.destroy();
$('#datatable4 tbody').empty(); // empty in case the columns change
getAppointment()
});
This is the content from the console log:
"Rendez-vous existant, veuillez choisir une autre date"