Rendering HTML received from API request

Loving Retool.
One thing I couldn't figure out: I have an API resource that returns errors in the form of an HTML page (e.g <html><body>Bad Request - ..details...</body></html>).
I want to display this error in a user friendly format. Specifically, I want to render the HTML.
What's the way to do this?

I tried creating a custom component but couldn't figure out the right way to pass the HTML-as-a-string parameter to the pure JS code such that it will render, and I couldn't find a way to see the generated IFrame code or any console errors.


Hi @ypeled, if it's very simple you might actually be able to pass it directly to a text component.

How complex is the HTML you're trying to render?

1 Like

Thanks, that did the trick!
What confused me here - "Markdown" to me is the format used to write .md files. I'm surprised it can be used for HTML.