From f22cdbb4ad4ea0039be9a87e20db9b60d08cc828 Mon Sep 17 00:00:00 2001 From: "Tommy D. Rossi" Date: Mon, 24 Nov 2025 19:41:06 +0100 Subject: [PATCH] do not fail on closing target --- extension/src/relayConnection.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/extension/src/relayConnection.ts b/extension/src/relayConnection.ts index 3840ee3..196fc32 100644 --- a/extension/src/relayConnection.ts +++ b/extension/src/relayConnection.ts @@ -445,7 +445,8 @@ export class RelayConnection { case 'Target.closeTarget': { if (!targetTab || !targetTab.debuggee.tabId) { - throw new Error(`Target not found: ${msg.params.params?.targetId}`) + logger.log(`Target not found: ${msg.params.params?.targetId}`) + return { success: false } satisfies Protocol.Target.CloseTargetResponse } await chrome.tabs.remove(targetTab.debuggee.tabId!) return { success: true } satisfies Protocol.Target.CloseTargetResponse