Update src/utils/fs.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Dennis Bartlettandellipsis-dev[bot] authored and GitHub committed 2025-03-10 20:58:18 -07:00
1 parent 0f0512363f
commit 0afa4c4fd8
1 file changed
+1 -1
+1 -1
View File
@@ -54,7 +54,7 @@ export async function readJsonConfigFile<T>(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)}`)
}