fix: resolve TS2345 in pageerror handler by using unknown and type guard
Some checks failed
🚀 Build & Deploy / 🔍 Prepare (push) Successful in 5s
🚀 Build & Deploy / 🧪 QA (push) Successful in 1m53s
🚀 Build & Deploy / 🏗️ Build (push) Successful in 11m58s
🚀 Build & Deploy / 🚀 Deploy (push) Successful in 11s
🚀 Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 3m27s
🚀 Build & Deploy / 🔔 Notify (push) Successful in 2s
Nightly QA / call-qa-workflow (push) Failing after 26s

This commit is contained in:
2026-04-21 19:32:07 +02:00
parent d4c32476d6
commit 785e36af08

View File

@@ -79,10 +79,11 @@ async function main() {
const consoleErrorsList: Array<{ type: string; error: string; page: string }> = [];
// Listen for unhandled exceptions natively in the page
page.on('pageerror', (err: Error) => {
page.on('pageerror', (err: unknown) => {
const errorMessage = err instanceof Error ? err.message : String(err);
consoleErrorsList.push({
type: 'PAGE_ERROR',
error: err.message,
error: errorMessage,
page: page.url(),
});
hasConsoleErrors = true;