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)}`) }