Better Ajax error handling.