mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 15:01:11 +03:00
fix(components): promise.all failed silently when loading MCP tools (#4750)
* fix(components): promise.all failed silently when loading MCP tools * fix: satisfy linter format * fix(packages): pnpm lint-fix * Update core.ts --------- Co-authored-by: Henry Heng <henryheng@flowiseai.com>
This commit is contained in:
@@ -111,7 +111,13 @@ export class MCPToolkit extends BaseToolkit {
|
|||||||
argsSchema: createSchemaModel(tool.inputSchema)
|
argsSchema: createSchemaModel(tool.inputSchema)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
return Promise.all(toolsPromises)
|
const res = await Promise.allSettled(toolsPromises)
|
||||||
|
const errors = res.filter((r) => r.status === 'rejected')
|
||||||
|
if (errors.length !== 0) {
|
||||||
|
console.error('MCP Tools falied to be resolved', errors)
|
||||||
|
}
|
||||||
|
const successes = res.filter((r) => r.status === 'fulfilled').map((r) => r.value)
|
||||||
|
return successes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user