$(document).ready(function() { $(document).ajaxError(function(event, jqXHR, ajaxSettings, thrownError) { alert(thrownError); });});