From 0afa4c4fd83ecb835ec4db8a287358686e314200 Mon Sep 17 00:00:00 2001 From: Dennis Bartlett Date: Mon, 10 Mar 2025 20:58:18 -0700 Subject: [PATCH] Update src/utils/fs.ts Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> --- src/utils/fs.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/fs.ts b/src/utils/fs.ts index a388abba..77b3e53a 100644 --- a/src/utils/fs.ts +++ b/src/utils/fs.ts @@ -54,7 +54,7 @@ export async function readJsonConfigFile(filePath: string, contextWindow: num return JSON.parse(content) as T } catch (error) { if (error instanceof SyntaxError) { - throw new Error(`Invalid JSON in config file ${filePath}: ${error.message}`) + throw new Error(`Invalid JSON in config file ${filePath}: ${error.message}`, { cause: error }) } throw new Error(`Failed to read config file ${filePath}: ${error instanceof Error ? error.message : String(error)}`) }