Fix: UpdateMCPProxy collapses transient DB errors into not-found response
Open
@dushaniw is already working on this.
Since Mar 27, 2026.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Summary
In gateway/gateway-controller/pkg/utils/mcp_deployment.go, the UpdateMCPProxy function currently collapses every error from GetMCPProxyByHandle into a generic "not found" message. This means transient DB/read failures are surfaced as false 404-like errors instead of internal errors.
Fix Required
Differentiate between true not-found errors and transient/unexpected errors in the UpdateMCPProxy lookup:
existing, err := s.GetMCPProxyByHandle(handle)
if err != nil {
if isMCPNotFoundError(err) {
return nil, fmt.Errorf("MCP proxy configuration with handle '%s' not found", handle)
}
return nil, fmt.Errorf("failed to look up MCP proxy: %w", err)
}
if existing == nil {
return nil, fmt.Errorf("MCP proxy configuration with handle '%s' not found", handle)
}
Context
- Flagged during code review of PR #1514 (comment: https://github.com/wso2/api-platform/pull/1514#discussion_r3000447264)
- Deferred to a follow-up PR by @dushaniw
/cc @dushaniw
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.