Update src/utils/fs.ts
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
0f0512363f
commit
0afa4c4fd8
1 file changed
+1
-1
+1
-1
@@ -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)}`)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user