add error messages on ajax requests