Reduce remaining MCP and persistence debug detail
This commit is contained in:
@@ -1397,6 +1397,7 @@ export function parseMcpConfigFromFilePath(params: {
|
||||
configContent = fs.readFileSync(filePath, { encoding: 'utf8' })
|
||||
} catch (error: unknown) {
|
||||
const code = getErrnoCode(error)
|
||||
const fileName = parse(filePath).base
|
||||
if (code === 'ENOENT') {
|
||||
return {
|
||||
config: null,
|
||||
@@ -1415,7 +1416,7 @@ export function parseMcpConfigFromFilePath(params: {
|
||||
}
|
||||
}
|
||||
logForDebugging(
|
||||
`MCP config read error for ${filePath} (scope=${scope}): ${error}`,
|
||||
`MCP config read error (scope=${scope}, file=${fileName}, errno=${code ?? 'none'}, errorType=${error instanceof Error ? error.name : typeof error})`,
|
||||
{ level: 'error' },
|
||||
)
|
||||
return {
|
||||
@@ -1439,7 +1440,7 @@ export function parseMcpConfigFromFilePath(params: {
|
||||
|
||||
if (!parsedJson) {
|
||||
logForDebugging(
|
||||
`MCP config is not valid JSON: ${filePath} (scope=${scope}, length=${configContent.length}, first100=${jsonStringify(configContent.slice(0, 100))})`,
|
||||
`MCP config is not valid JSON (scope=${scope}, file=${parse(filePath).base}, length=${configContent.length})`,
|
||||
{ level: 'error' },
|
||||
)
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user