The `showContentProfilePreview` function is probably not the best place to do the error handling, as it doesn't quite fit there. It's also a bit weird to have to pass and error object into this function. Setting the contentProfile is probably something that logically expect to happen outside of this function.

I think we only have to do the error handling once, when the page is loaded, not necessarily after each new version upload, as that shouldn't have any effect on access to the content.