diff --git a/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts b/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts index 61b2d8774f4ace..c1e5c6fbe39b95 100644 --- a/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts +++ b/.buildkite/scripts/steps/artifacts/validate_cdn_assets.ts @@ -46,14 +46,22 @@ async function main() { async function headAssetUrl(assetPath: string) { const testUrl = `${CDN_URL_PREFIX}/${assetPath}`; - const response = await axios.head(testUrl, { - timeout: 1000, - }); - return { - status: response.status, - testUrl, - assetPath, - }; + try { + const response = await axios.head(testUrl, { + timeout: 1000, + }); + return { + status: response.status, + testUrl, + assetPath, + }; + } catch (error) { + return { + status: error.response?.status || 0, + testUrl, + assetPath, + }; + } } async function headAssetUrlWithRetry(