From 46154fa49aaf97094bff15d432a14c399582f8f9 Mon Sep 17 00:00:00 2001 From: Moyasee Date: Tue, 20 Jan 2026 19:34:04 +0200 Subject: [PATCH] fix: correct error handling in Python RPC process exit code --- src/main/services/python-rpc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/services/python-rpc.ts b/src/main/services/python-rpc.ts index b8535e35..38966e65 100644 --- a/src/main/services/python-rpc.ts +++ b/src/main/services/python-rpc.ts @@ -156,10 +156,10 @@ export class PythonRPC { if (!resolved) { resolved = true; cleanup(); - if (code !== 0) { - reject(new Error(`Python RPC process exited with code ${code}`)); - } else { + if (code === 0) { resolve(null); + } else { + reject(new Error(`Python RPC process exited with code ${code}`)); } } });