Skip to content

fix(nodes-langchain): strip internal stack traces from MCP trigger error responses#28499

Open
SAY-5 wants to merge 1 commit inton8n-io:masterfrom
SAY-5:fix/mcp-trigger-strip-stack-traces-v2
Open

fix(nodes-langchain): strip internal stack traces from MCP trigger error responses#28499
SAY-5 wants to merge 1 commit inton8n-io:masterfrom
SAY-5:fix/mcp-trigger-strip-stack-traces-v2

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented Apr 15, 2026

Per #28414, MessageFormatter.formatError() in the MCP Trigger node appends the full server-side stack trace to the tool error response that gets sent back to the MCP client over JSON-RPC. Stack traces are internal implementation details and should not leak to clients.

This PR returns only name: message in the response. The existing call site in McpServer.ts already logs the full error server-side for debugging, so no observability is lost.

Closes #28414

…ror responses

Per n8n-io#28414, MessageFormatter.formatError() in the MCP Trigger node
appends the full server-side stack trace to the tool error response
that gets sent back to the MCP client over JSON-RPC. Stack traces are
internal implementation details and should not leak to clients.

Return only `name: message` in the response. The existing call site
in McpServer.ts already logs the full error server-side for
debugging.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

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.

bug(nodes-langchain): MCP trigger returns internal stack traces in tool error responses

1 participant