mirror of
https://github.com/fish2018/pansou.git
synced 2025-11-25 03:14:59 +08:00
fix(搜索工具): 添加错误日志记录以帮助调试
在搜索工具执行过程中发生错误时,现在会记录详细的错误信息(包括消息、堆栈、名称、时间戳和原始参数)到控制台,便于后续问题排查
This commit is contained in:
@@ -133,6 +133,13 @@ export async function executeSearchTool(args: unknown, httpClient: HttpClient):
|
||||
}
|
||||
|
||||
if (error instanceof Error) {
|
||||
console.error('搜索过程中发生错误:', {
|
||||
message: error.message,
|
||||
stack: error.stack,
|
||||
name: error.name,
|
||||
timestamp: new Date().toISOString(),
|
||||
originalArgs: args
|
||||
});
|
||||
throw error;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user