console loggin error on ajax call