fix(writer-pipeline): demote sitemap gateway 502/503/504 to warning (BIT-30847) #51
No files matched your search
@@ -22,9 +22,28 @@ describe('cycleErrorMessageLevel', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps whole-source sitemap failures as error', () => {
|
||||
it('downgrades whole-source sitemap gateway blips to warning (BIT-30847)', () => {
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel(
|
||||
'sitemap eurohandball_sitemap (https://www.eurohandball.com/google-news-sitemap.xml): HTTP 502',
|
||||
),
|
||||
'warning',
|
||||
);
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel('sitemap eurohandball_sitemap (https://www.eurohandball.com/sitemap.xml): HTTP 503'),
|
||||
'warning',
|
||||
);
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel(
|
||||
'sitemap eurohandball_sitemap (https://www.eurohandball.com/google-news-sitemap.xml): HTTP 504',
|
||||
),
|
||||
'warning',
|
||||
);
|
||||
});
|
||||
|
||||
it('keeps whole-source sitemap HTTP 500 as error (actionable upstream/config)', () => {
|
||||
assert.equal(
|
||||
cycleErrorMessageLevel('sitemap eurohandball_sitemap (https://www.eurohandball.com/sitemap.xml): HTTP 500'),
|
||||
'error',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -16,6 +16,15 @@ export function cycleErrorMessageLevel(message: string): 'warning' | 'error' {
|
||||
if (message.includes('truncating')) return 'warning';
|
||||
// Per-URL HTML probe failed but other pages in the same source may have succeeded.
|
||||
if (/^sitemap .+ page \(https?:\/\//.test(message)) return 'warning';
|
||||
// Whole-source fetch already retries (http-retry); remaining gateway blips are upstream
|
||||
// noise (BIT-30847 / ERRSIG a92b3521aec8). Keep HTTP 500 as error — that flagged the
|
||||
// broken /sitemap.xml URL fixed in BIT-30741.
|
||||
if (
|
||||
/^sitemap .+ \(https?:\/\//.test(message) &&
|
||||
/: HTTP (502|503|504)\b/.test(message)
|
||||
) {
|
||||
return 'warning';
|
||||
}
|
||||
return 'error';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user