add error_span helper to templates