fix(httpapi): return mcp server not found errors (#28817)
This commit is contained in:
parent
51da3483a9
commit
0beb4de3e8
1 changed files with 158 additions and 72 deletions
|
|
@ -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",
|
||||
)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue