How to suppress or hide ajax error?
How to suppress or hide ajax error?

How to suppress ajax error?
I have figured out the ajax error, because of the session has timed out, but how to suppress or hide it, I expect to only refresh the page if the ajax error occurs.. I have tried the following:

.on( 'error.dt', function ( e, settings, techNote, message ) {
e.preventDefault();
location.reload();
return true;
});
I need advice, many thanks in advance
Don
This discussion has been closed.
Answers
Have the server return
{"data":[],"error":"..."}
or something like that when this happens, and then yourerror
handler can check the response and reload the page as required.Allan