131: problems = validate_html(html_body) 132: if problems: # validate_html returns a list of problem strings 134: detail=f"HTML rejected: {'; '.join(problems)}") 181: problems = validate_html(tpl.body_html) 182: if problems: # list of problem strings 184: detail=f"Template has errors: {'; '.join(problems)}")