Skip to content

fix(components): promise.all failed silently when loading MCP tools#4750

Merged
HenryHengZJ merged 4 commits intoFlowiseAI:mainfrom
rickliujh:fix/mcp-promise-all-failed-silently
Jul 9, 2025
Merged

fix(components): promise.all failed silently when loading MCP tools#4750
HenryHengZJ merged 4 commits intoFlowiseAI:mainfrom
rickliujh:fix/mcp-promise-all-failed-silently

Conversation

@rickliujh
Copy link
Contributor

When some of tools in custom MCP server have incorrect schema definition, Flowise failed to load that MCP server with zero error indication.

Linked to Issue #4749

The root cause is when there is any rejected promise the Promise.all() will abort all remaining result and fall silently.

This PR replace Promise.all() with Promise.allSettled(), this change provides two benefits:

  1. even some tools failed to resolve, remaining tools that available in that MCP server is still accessible
  2. print errors making it easier to debug for Custom MCP users

@HenryHengZJ
Copy link
Contributor

pnpm lint-fix to get rid of the linting issues

Copy link
Contributor

@HenryHengZJ HenryHengZJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@HenryHengZJ HenryHengZJ merged commit aea2801 into FlowiseAI:main Jul 9, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants