This isn't actually html, is it? And if you want the runtime/studio to decide how to display error messages, it's going to be annoying/fragile if in both the non-error and error paths you're returning a string.