fix(httpapi): return mcp server not found errors (#28817)

This commit is contained in:
Shoubhit Dash 2026-05-22 17:46:30 +05:30 • committed by GitHub
commit 0beb4de3e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,4 +173,21 @@ describe("PublicApi OpenAPI v2 errors", () => {
)
}
})
test("documents MCP server not-found errors", () => {
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
for (const route of [
["post", "/mcp/{name}/auth"],
["post", "/mcp/{name}/auth/authenticate"],
["post", "/mcp/{name}/auth/callback"],
["delete", "/mcp/{name}/auth"],
["post", "/mcp/{name}/connect"],
["post", "/mcp/{name}/disconnect"],
] as const) {
expect(componentName(responseRef(spec.paths[route[1]]?.[route[0]]?.responses?.["404"]) ?? "")).toBe(
"McpServerNotFoundError",
)
}
})
})