I have a datatable pulling data from the server.
If all is ok it returns a perfectly valid json response which datatbles renders happily, if something is wrong server side it returns json error object as follows.
{"success":false,"message":"some error message"}
My table is defined as follows:
Table = $('#usersTable').DataTable({
"pagingType": "full_numbers",
"serverSide": true,
"processing": true,
"ajax": {
url:"/user/getUsers/"
}
});
How would I intercede to stop datatables doing anything so I could process the error message if response.success is defined and false?
I am using the latest version of jquery datatables