Catch all exceptions when processing AJAX requests.