The error message is the response that is returned from Discourse when you publish the post. I am surprised that the post was published with the error.
Since you are publishing the entire post as an iframe, I’m not sure why you are adding the post content after the iframe.