From 6dfdfc3fb85005b30be97f0cc8b2272261fecf65 Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 17 May 2026 07:10:47 +0000 Subject: [PATCH] Accept structured tunnel self-test timeouts --- src/components/backend-core/src/microservice-proxy.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/backend-core/src/microservice-proxy.ts b/src/components/backend-core/src/microservice-proxy.ts index a37ec9b6..75c4e01b 100644 --- a/src/components/backend-core/src/microservice-proxy.ts +++ b/src/components/backend-core/src/microservice-proxy.ts @@ -766,7 +766,8 @@ async function microserviceTunnelSelfTestResponse(service: MicroserviceConfig): const bodyRecord = isPlainRecord(body) ? body : {}; const hasRequestId = typeof bodyRecord.requestId === "string" && bodyRecord.requestId.length > 0; const hasStage = typeof bodyRecord.stage === "string" && bodyRecord.stage.length > 0; - const ok = response.status === 502 && hasRequestId && hasStage && headers.requestId === bodyRecord.requestId; + const expectedStatus = response.status === 502 || response.status === 504; + const ok = expectedStatus && hasRequestId && hasStage && headers.requestId === bodyRecord.requestId; return jsonResponse({ ok, serviceId: service.id, @@ -775,7 +776,7 @@ async function microserviceTunnelSelfTestResponse(service: MicroserviceConfig): expectedFailure: true, status: response.status, checks: { - expectedStatus: response.status === 502, + expectedStatus, bodyHasRequestId: hasRequestId, bodyHasStage: hasStage, headerHasRequestId: typeof headers.requestId === "string" && headers.requestId.length > 0,