From 14369836f69c29119357869c8c44fdf1af34c8ec Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Fri, 15 May 2026 15:13:52 +0000 Subject: [PATCH] feat(docs): Add more descriptive error logging for config file parsing --- docsite/src/components/FileConfigExample.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docsite/src/components/FileConfigExample.tsx b/docsite/src/components/FileConfigExample.tsx index e15ce333..ff98ddc1 100644 --- a/docsite/src/components/FileConfigExample.tsx +++ b/docsite/src/components/FileConfigExample.tsx @@ -27,7 +27,7 @@ const FileConfigExample = (props: FileConfigProps) => { try { configObj = json5.parse(data) as object[]; } catch (e) { - console.error(e); + console.error(new Error(`Unable to parse content for ${aio === true ? 'aio ' :''}${name}`, {cause: e})); return

Example component crashed because of error!

{e.message} @@ -37,7 +37,11 @@ const FileConfigExample = (props: FileConfigProps) => { const transformed = useMemo(() => { let content: object; if(typeof data === 'string') { + try { content = json5.parse(data); + } catch (e) { + console.error(new Error(`Unable to parse transformed content for ${aio === true ? 'aio ' :''}${name}`, {cause: e})); + } } else { content = data; } -- 2.51.2