diff --git a/scripts/scripts.js b/scripts/scripts.js index abfeebd..5f86cfe 100644 --- a/scripts/scripts.js +++ b/scripts/scripts.js @@ -195,4 +195,10 @@ export const LIBS = setLibs(window.location); if (document.querySelector('.faas')) { loadStyle('/styles/faas.css'); } + const observer = new PerformanceObserver((list) => { + list.getEntries().forEach((entry) => { + if (entry.responseStatus === 404) window.lana?.log(`The resource ${entry.name} returned a 404 status.`, { tags: 'errorType=error,module=resource-404' }); + }); + }); + observer.observe({ type: 'resource', buffered: true }); }());