added error to ajax call