Log only HTTP errors (#2702)
This commit is contained in:
parent
b55f1e4d44
commit
1ca9d563b5
|
|
@ -82,11 +82,13 @@ module.exports = {
|
|||
for (let summary of pageSummary) {
|
||||
if (Object.keys(summary.responseCodes).some(code => code > 399)) {
|
||||
for (let asset of summary.assets) {
|
||||
log.info(
|
||||
`Error: The server responded with a ${
|
||||
asset.status
|
||||
} status code for ${asset.url}`
|
||||
);
|
||||
if (asset.status > 399) {
|
||||
log.info(
|
||||
`The server responded with a ${
|
||||
asset.status
|
||||
} status code for ${asset.url}`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue