Add logging around AJAX request success or failure.