I’m generating a http 403 on session timeout for ajax calls. When using jquery Datatables I can use fnServeData to intercept the returning call like this
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.getJSON( sSource, aoData, function (json) {
fnCallback(json);
});
}
Which normally just forwards the result onto the datatable – but when I return a 403 i just get the http error in my Firebug console – how / where can i check for the 403 so i can display a dialog?
After a bit more digging – one solution is to add an error handler like this: