fix(httpapi): return session busy error bodies (#28684)

This commit is contained in:
Shoubhit Dash
2026-05-21 22:53:49 +05:30
committed by GitHub
parent 6c24062d2f
commit 82b796ce31
4 changed files with 48 additions and 8 deletions

View File

@@ -142,4 +142,19 @@ describe("PublicApi OpenAPI v2 errors", () => {
)
}
})
test("documents session busy errors", () => {
const spec = OpenApi.fromApi(PublicApi) as OpenApiSpec
for (const route of [
["post", "/session/{sessionID}/shell"],
["post", "/session/{sessionID}/revert"],
["post", "/session/{sessionID}/unrevert"],
["delete", "/session/{sessionID}/message/{messageID}"],
] as const) {
expect(componentName(responseRef(spec.paths[route[1]]?.[route[0]]?.responses?.["409"]) ?? "")).toBe(
"SessionBusyError",
)
}
})
})