Skip to content

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Jun 13, 2025

Previously the message handling block treated only JsonRpcMessage::JsonRpcResponse types with ids as request responses, and all other messages were sent to the notification stream. But, servers may send back a JsonRpcError which is distinct from JsonRpcResponse. This should not be sent to the notification stream.

Also added this to the integration test.

Fixes #2884

@yingjiehe-xyz yingjiehe-xyz merged commit 1326db2 into main Jun 13, 2025
7 checks passed
@yingjiehe-xyz yingjiehe-xyz deleted the jackamadeo/fix-mcp-error-handling branch June 13, 2025 16:05
opdich added a commit to opdich/goose that referenced this pull request Jun 13, 2025
* upstream/main:
  Disable updater until we can debug more in release (block#2908)
  fix router trait error (block#2910)
  fix: Check for stderr error in receive() (block#2905)
  Damien/sagemaker tgi (block#2888)
  feat: (tool router) llm tool selector (block#2866)
  feat: (tool router) adds extension name in vector db & search tool (block#2855)
  Check for UPDATES_ENABLED flag before running update logic or in ui (block#2897)
  fix: handled the missing keyring error gracefully with a user-friendly message (block#2900)
  fix: handle JsonRPC error variants as responses (block#2903)
s-soroosh pushed a commit to s-soroosh/goose that referenced this pull request Jul 18, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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.

Errors from the MCP server (type: stdio) are not being handled as expected

3 participants