Skip to content

Commit f71e08e

Browse files
committed
fix: catch ElectronShellOpenExternalError in IPC handler to preserve boolean contract
The openExternal IPC handler was propagating ElectronShellOpenExternalError as a rejection instead of resolving with false, breaking the boolean contract expected by renderer callers. Use Effect.orElseSucceed to return false on failure, matching the result: Schema.Boolean contract.
1 parent f5fe411 commit f71e08e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/desktop/src/ipc/methods/window.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,6 @@ export const openExternal = DesktopIpc.makeIpcMethod({
141141
result: Schema.Boolean,
142142
handler: Effect.fn("desktop.ipc.window.openExternal")(function* (url) {
143143
const shell = yield* ElectronShell.ElectronShell;
144-
return yield* shell.openExternal(url);
144+
return yield* shell.openExternal(url).pipe(Effect.orElseSucceed(() => false));
145145
}),
146146
});

0 commit comments

Comments
 (0)