Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2cf768cf3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const tcbEntry = service === "tcb" ? findTcbActionEntry(action) : undefined; | ||
| const hasInvalidActionError = /invalid or not found|does not exist|not recognized/i.test(baseMessage); | ||
| const hasParameterError = /parameter\s+`?.+?`?\s+is not recognized|MissingParameter|missing parameter|missing required/i.test(baseMessage); | ||
| const hasInvalidParameterValueError = /invalid parameter value/i.test(baseMessage); |
There was a problem hiding this comment.
Match InvalidParameterValue error code variant
The new detector only matches the spaced phrase invalid parameter value, but CloudBase control-plane responses commonly use the TCAPI code token InvalidParameterValue (see the x-tcapi-errorcodes lists in mcp/assets/control-plane/tcb-openapi.yaml, e.g. around lines 2411-2418). In that common case this branch will never run, so the newly added targeted guidance is skipped and users still get the generic fallback message.
Useful? React with 👍 / 👎.
Attribution post-PR evaluation
Cases
|
|
参考codex 代码 review结论 |
Attribution issue
Automation summary
**
capi.tsorfunctions.ts. This resulted in vague error messages that didn't help users identify which parameter was wrong or how to fix it.hasInvalidParameterValueErrorregex pattern and corresponding handling inbuildCapiErrorMessage()to detect "invalid parameter value" errors. When detected, the tool now provides specific guidance about:buildFunctionOperationErrorMessage()with specific guidance for function deployment:runtime: Supported versions (Nodejs18.15, Nodejs16.13, Nodejs20.19) with case sensitivity notehandler: Default values for Event vs HTTP functionsfunctionName: Valid charactChanged files
mcp/src/tools/capi.tsmcp/src/tools/functions.ts