Add slightly more intelligent error handling to ajaxError