Hi,
What is the correct way to check that content of my section is failed?
If I’m checking it like this, is it correct? -
const fetchBuilderContent = async pathname => {
try {
builder.init(publicApiKey);
const content = await builder.get(BUILDER_IO_PRIVACY_EXPLAINED_SECTION_NAME, {url: pathname}).promise();
if (content) {
setBuilderContentJson(content);
} else {
reportStatistic(BUILDER_IO_SECTION_FAILED, BUILDER_IO_PRIVACY_EXPLAINED_SECTION_NAME);
}
} catch (error) {
reportStatistic(BUILDER_IO_SECTION_FAILED, BUILDER_IO_PRIVACY_EXPLAINED_SECTION_NAME);
}