fix(httpapi): return pty error bodies (#28838)

This commit is contained in:
Shoubhit Dash
2026-05-22 21:00:20 +05:30
committed by GitHub
parent d92b8d8009
commit 5cf597d583
7 changed files with 119 additions and 14 deletions
@@ -371,7 +371,6 @@ function referencesComponent(input: unknown, name: string): boolean {
function normalizeLegacyOperation(operation: OpenApiOperation, path: string, method: string) {
if (path === "/experimental/console/switch" && method === "post") delete operation.responses?.["400"]
if (path === "/pty/{ptyID}" && method === "put") delete operation.responses?.["404"]
if ((path !== "/session/{sessionID}/message" && path !== "/session/{sessionID}/command") || method !== "post") return
const response = operation.responses?.["200"]?.content?.["application/json"]
if (!response) return