Skip to content

Return correct mcp error#62

Merged
lucarlig merged 3 commits into
mainfrom
return_correct_mcp_error
Jul 23, 2026
Merged

Return correct mcp error#62
lucarlig merged 3 commits into
mainfrom
return_correct_mcp_error

Conversation

@cafalchio

@cafalchio cafalchio commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This PR improves MCP error handling in the gateway by returning semantically correct error codes and messages.

closes #5272

Changes include:

  • (1) propagating actual MCP errors from backends instead of generic internal errors
  • (2) using INVALID_PARAMS instead of INTERNAL_ERROR for routing failures when tools/prompts are not found
  • (3) clarifying error messages ("tool not found" vs "wrong tool name", "invalid prompt name" vs "wrong prompt name")

Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
Signed-off-by: cafalchio <mcafalchio@gmail.com>
@cafalchio
cafalchio requested a review from lucarlig July 23, 2026 12:27

@lucarlig lucarlig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@lucarlig
lucarlig merged commit 511a4af into main Jul 23, 2026
7 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