diff --git a/apps/api/src/cutover-orchestrator.ts b/apps/api/src/cutover-orchestrator.ts index aed88a2..361d462 100644 --- a/apps/api/src/cutover-orchestrator.ts +++ b/apps/api/src/cutover-orchestrator.ts @@ -72,11 +72,12 @@ function runFile(file: string, args: readonly string[]): Promise { function authenticatedReady(port: 8788 | 8790, gatewayToken: string): Promise { return new Promise((resolvePromise) => { + const path = port === 8790 ? '/healthz' : '/readyz'; const req = request( { host: '127.0.0.1', port, - path: '/readyz', + path, timeout: 2_000, headers: { [GATEWAY_AUTH_HEADER]: gatewayToken }, }, @@ -364,7 +365,7 @@ export async function preflight( ): Promise { requireGatewayToken(gatewayToken); if (!(await system.ready(8790, gatewayToken))) - throw new Error('Authenticated API readiness preflight failed on 127.0.0.1:8790/readyz'); + throw new Error('Authenticated API health preflight failed on 127.0.0.1:8790/healthz'); const indexPath = join(await realpath(plan.assetDir), 'index.html'); const asset = await lstat(indexPath); if (!asset.isFile()) throw new Error('assetDir/index.html must be a regular file');