From e036dea089c796b0546eb612b0954e0ecfa830f3 Mon Sep 17 00:00:00 2001 From: Marc Mintel Date: Mon, 16 Feb 2026 22:35:39 +0100 Subject: [PATCH] fix: pipeline --- i18n/request.ts | 6 ++---- scripts/check-og-images.ts | 3 ++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/i18n/request.ts b/i18n/request.ts index 5cf50a78..79054571 100644 --- a/i18n/request.ts +++ b/i18n/request.ts @@ -9,11 +9,9 @@ export default getRequestConfig(async ({ requestLocale }) => { const locale = typeof rawLocale === 'string' && supportedLocales.includes(rawLocale) ? rawLocale : 'en'; - // Log to Sentry if we had to fallback, as it might indicate a routing issue + // Silent fallback for missing locales to support internal requests (e.g. OG generation) if (!rawLocale || !supportedLocales.includes(rawLocale as string)) { - console.warn( - `[i18n] Invalid or missing requestLocale received: "${rawLocale}". Falling back to "en".`, - ); + // console.debug(`[i18n] Fallback to "en" for locale: "${rawLocale}"`); } return { diff --git a/scripts/check-og-images.ts b/scripts/check-og-images.ts index d1db2bde..790c3b25 100644 --- a/scripts/check-og-images.ts +++ b/scripts/check-og-images.ts @@ -30,8 +30,9 @@ async function verifyImage(path: string): Promise { if (!contentType?.includes('image/png')) { const body = await response.text(); console.log(` Headers: ${JSON.stringify(Object.fromEntries(response.headers))}`); + console.log(` Status Text: ${response.statusText}`); throw new Error( - `Content-Type: ${contentType}. Body preview: ${body.substring(0, 500).replace(/\n/g, ' ')}...`, + `Status: ${response.status}. Content-Type: ${contentType}. Body preview: ${body.substring(0, 1000).replace(/\n/g, ' ')}...`, ); }