Im using Datatables and server side processing for data loading.
For the current implementation the table data generates without any error unless there is an session expiry or server timeout.
I would like to handle server side exceptions and if everything is ok, the table data should load.
The below is the function
let scheduler_name = $("#sche_name").val().trim();
$('#monitor_scheduler_tbl').DataTable( {
"aoColumnDefs": [
{ 'bSortable': true, 'aTargets': [0,1,2,3] },{ "bSearchable": false,'aTargets': [-1] }],
"processing": true,
"bDestroy": true,
"bFilter":false,
"serverSide": true,
"ajax": {
"url": config.yaws_file_path + "css_monitor_scheduler.yaws",
"data": function ( d ) {
d.action = "SEARCH_SCHEDULER",
d.scheduler_name = scheduler_name;
},
"complete": function(response){
res = JSON.parse(response.responseText);
if(error = res['err'])
{
objApp.showToastMessage('error', error);
}
}
}
});