From 98873244690808a49a4112c476feaf4fcc14ee51 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Sat, 28 Feb 2026 22:56:41 +0100 Subject: [PATCH] fix(ci): point CMS deep health check to correct api/health endpoint and improve check-http error formatting --- .gitea/workflows/deploy.yml | 2 +- scripts/check-http.ts | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 7f3eaa2..d8efe04 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -428,7 +428,7 @@ jobs: echo "Waiting 10s for app to fully start..." sleep 10 echo "Checking basic health..." - curl -sf "$DEPLOY_URL/health" || { echo "āŒ Basic health check failed"; exit 1; } + curl -sf "$DEPLOY_URL/api/health" || { echo "āŒ Basic health check failed"; exit 1; } echo "āœ… Basic health OK" - name: 🌐 Core Smoke Tests (HTTP, API, Locale) diff --git a/scripts/check-http.ts b/scripts/check-http.ts index 8a21206..474113a 100644 --- a/scripts/check-http.ts +++ b/scripts/check-http.ts @@ -75,9 +75,16 @@ async function main() { ); process.exit(0); } - } catch (e) { - const error = e as Error; - console.error(`\nāŒ Critical Error during Sitemap Fetch:`, error.message); + } catch (error: any) { + if (error.response) { + console.error( + `\nāŒ Critical Error during Sitemap Fetch: HTTP ${error.response.status} ${error.response.statusText}`, + ); + } else { + console.error( + `\nāŒ Critical Error during Sitemap Fetch: ${error.message || error}`, + ); + } process.exit(1); } }