From cc10186ec3fa1e0e69a2dc374d4f469e8b2c7928 Mon Sep 17 00:00:00 2001 From: Zamitto <167933696+zamitto@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:24:32 -0300 Subject: [PATCH] feat: add trycatch for handleDeepLinkPath --- src/main/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/index.ts b/src/main/index.ts index e288302b..11eb479d 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -86,10 +86,15 @@ app.on("browser-window-created", (_, window) => { const handleDeepLinkPath = (uri?: string) => { if (!uri) return; - const url = new URL(uri); - if (url.host === "install-source") { - WindowManager.redirect(`settings${url.search}`); + try { + const url = new URL(uri); + + if (url.host === "install-source") { + WindowManager.redirect(`settings${url.search}`); + } + } catch (error) { + logger.error("Error handling deep link", uri, error); } };