send correct HTML on error messages