The MCP plugin needs to add an API error response template <ErrorResponseTemplate>
#2330 aperta il 27 mag 2025
Metriche repository
- Star
- (9036 stelle)
- Metriche merge PR
- (Merge medio 7g 9h) (18 PR mergiate in 30 g)
Descrizione
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.