handle xhr fails