V4.12.3 document (#5600)

* doc

* doc

* perf: log
This commit is contained in:
Archer
2025-09-07 20:55:14 +08:00
committed by GitHub
parent 3f9b0fa1d4
commit c4632a2222
10 changed files with 62 additions and 49 deletions

View File

@@ -8,6 +8,7 @@ import { retryFn } from '@fastgpt/global/common/system/utils';
import { PluginSourceEnum } from '@fastgpt/global/core/app/plugin/constants';
import { MongoApp } from './schema';
import type { McpToolDataType } from '@fastgpt/global/core/app/mcpTools/type';
import { UserError } from '@fastgpt/global/common/error/utils';
export class MCPClient {
private client: Client;
@@ -76,7 +77,7 @@ export class MCPClient {
const response = await client.listTools();
if (!Array.isArray(response.tools)) {
return Promise.reject('[MCP Client] Get tools response is not an array');
return Promise.reject(new UserError('[MCP Client] Get tools response is not an array'));
}
const tools = response.tools.map((tool) => ({