From 9a96582bfc5145beb2362708da8a855561ba714a Mon Sep 17 00:00:00 2001 From: Siddharth Singh Date: Mon, 5 Aug 2024 22:36:48 +0530 Subject: [PATCH] catch errors while building opengraph metadata to allow _some_ metadata to make it out still --- src/controllers/frontend.ts | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/controllers/frontend.ts b/src/controllers/frontend.ts index bc4f149c..e19e5a1e 100644 --- a/src/controllers/frontend.ts +++ b/src/controllers/frontend.ts @@ -37,20 +37,25 @@ async function buildTemplateOpts(params: PathParams, url: string): Promise { const meta = metadataView(await buildTemplateOpts(params, Conf.local(c.req.path))); return c.html(content.replace(META_PLACEHOLDER, meta)); } catch (e) { - console.debug(e); + console.log(e); return c.html(content); } }