Added AJAX exceptions handler