Skip to content

The MCP plugin needs to add an API error response template <ErrorResponseTemplate> #2330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zhangjingcn opened this issue May 27, 2025 · 0 comments
Labels
help wanted Extra attention is needed level/normal

Comments

@zhangjingcn
Copy link

zhangjingcn commented May 27, 2025

Why do you need it?

When configuring an MCP service in Higress via the MCP plugin, if the HTTP response status code of the corresponding API is not equal to 200, the current response is fixed as: call failed, status: %d, response: %s. This error message cannot be customized, and in scenarios where the error code and message are provided through HTTP headers, this information is discarded.

How could it be?

It is recommended to add an error template in the MCP plugin configuration, which provides variables to read header values based on header keys and parse the body as JSON, so that customized error messages can be displayed.

@zhangjingcn zhangjingcn changed the title The MCP plugin adds an API error response template <ErrorResponseTemplate> The MCP plugin needs to add an API error response template <ErrorResponseTemplate> May 27, 2025
@johnlanni johnlanni assigned johnlanni and unassigned johnlanni May 27, 2025
@johnlanni johnlanni added the help wanted Extra attention is needed label May 27, 2025
@github-project-automation github-project-automation bot moved this to Todo in Higress May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed level/normal
Projects
Status: Todo
Development

No branches or pull requests

2 participants