add error message to view