fix: pipeline
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 8s
Build & Deploy / 🧪 QA (push) Successful in 1m26s
Build & Deploy / 🏗️ Build (push) Successful in 2m51s
Build & Deploy / 🚀 Deploy (push) Successful in 28s
Build & Deploy / 🧪 Smoke Test (push) Failing after 1m50s
Build & Deploy / 🔔 Notify (push) Successful in 3s

This commit is contained in:
2026-02-16 23:08:12 +01:00
parent e036dea089
commit c859d5e677
3 changed files with 12 additions and 9 deletions

View File

@@ -22,17 +22,20 @@ async function verifyImage(path: string): Promise<boolean> {
console.log(`Checking ${url}...`);
if (response.status !== 200) {
throw new Error(`Status: ${response.status}`);
}
const body = await response.text();
const contentType = response.headers.get('content-type');
if (!contentType?.includes('image/png')) {
const body = await response.text();
if (response.status !== 200) {
console.log(` Headers: ${JSON.stringify(Object.fromEntries(response.headers))}`);
console.log(` Status Text: ${response.statusText}`);
throw new Error(
`Status: ${response.status}. Content-Type: ${contentType}. Body preview: ${body.substring(0, 1000).replace(/\n/g, ' ')}...`,
`Status: ${response.status}. Body preview: ${body.substring(0, 1000).replace(/\n/g, ' ')}...`,
);
}
if (!contentType?.includes('image/png')) {
throw new Error(
`Content-Type: ${contentType}. Body preview: ${body.substring(0, 1000).replace(/\n/g, ' ')}...`,
);
}