From 663c54c567aff62a0b8a1d1fdda037ccc69a1a99 Mon Sep 17 00:00:00 2001 From: vollstock Date: Mon, 19 Oct 2026 11:50:38 +0200 Subject: [PATCH] Print a meaningful error mesage on webContents did-fail-load --- main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index ee6a8f9..0ce1e39 100644 --- a/main.js +++ b/main.js @@ -68,9 +68,9 @@ function createMainWindow() { } return { action: 'deny' }; }); - win.webContents.on("did-fail-load", (event) => { - log.error(event); - if (event.isMainFrame && event.errorCode !== -3 && config.data?.url) { + win.webContents.on("did-fail-load", (event, errorCode, errorDescription, validatedURL, isMainFrame) => { + log.error(`Failed to load URL: ${validatedURL} with error: ${errorDescription}`); + if (errorCode !== -3 && config.data?.url) { loadOfflinePage(); } });