Handle non-200 errors from AJAX