From 8d652c4d2e63975c8190c9a4fb8c1a7ddbb9baf5 Mon Sep 17 00:00:00 2001 From: proxy Date: Sat, 21 Feb 2026 16:01:14 -0500 Subject: [PATCH] fix: wrap HTTP_SERVER_GET_STATUS response in IpcResult envelope The HTTP_SERVER_GET_STATUS handler returned a raw { running, port } object while all other HTTP server handlers (start, stop) return { success, data }. invokeIpcWithResult() in the preload expects the IpcResult envelope and treats a missing success field as failure, throwing 'Unknown error'. This caused an unhandled promise rejection every time the Settings page opened, because GeneralSection calls api.httpServer.getStatus() on mount. Co-Authored-By: Claude Sonnet 4.6 --- src/main/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/index.ts b/src/main/index.ts index 6484e149..8ae60eb4 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -310,7 +310,7 @@ function initializeServices(): void { }); ipcMain.handle(HTTP_SERVER_GET_STATUS, () => { - return { running: httpServer.isRunning(), port: httpServer.getPort() }; + return { success: true, data: { running: httpServer.isRunning(), port: httpServer.getPort() } }; }); // Forward SSH state changes to renderer and HTTP SSE clients