Prevent duplicate error messages on AJAX failures