fix(httpapi): handle corrupt v2 session messages (#28633)

This commit is contained in:
Shoubhit Dash
2026-05-21 16:30:04 +05:30
committed by GitHub
parent 4a976482b1
commit 9739d75892
7 changed files with 120 additions and 13 deletions

View File

@@ -129,4 +129,17 @@ describe("PublicApi OpenAPI v2 errors", () => {
)
}
})
test("documents v2 session read data errors", () => {
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
for (const route of [
["get", "/api/session/{sessionID}/context"],
["get", "/api/session/{sessionID}/message"],
] as const) {
expect(componentName(responseRef(spec.paths[route[1]]?.[route[0]]?.responses?.["500"]) ?? "")).toMatch(
/^UnknownError\d*$/,
)
}
})
})