Be robust in handling errors when calling getFullHTMLForExport hook