From a258f4f5bd3d32d70a6174edd01b94aec1a2cb41 Mon Sep 17 00:00:00 2001 From: Samuel Bushi Date: Wed, 21 Jan 2026 19:01:29 -0500 Subject: [PATCH 1/3] fix(js/core): Exit if reflection server fails to start --- js/core/src/reflection.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/js/core/src/reflection.ts b/js/core/src/reflection.ts index 42cf507ca3..0433a5de6e 100644 --- a/js/core/src/reflection.ts +++ b/js/core/src/reflection.ts @@ -418,6 +418,7 @@ export class ReflectionServer { await this.writeRuntimeFile(); } catch (e) { logger.error(`Error initializing plugins: ${e}`); + process.exit(1); } }); } From 0d130fe3e4902f138ef395136b870ef8df0a2822 Mon Sep 17 00:00:00 2001 From: Samuel Bushi Date: Thu, 22 Jan 2026 10:08:50 -0500 Subject: [PATCH 2/3] feedback --- js/core/src/reflection.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/core/src/reflection.ts b/js/core/src/reflection.ts index 0433a5de6e..421dae2281 100644 --- a/js/core/src/reflection.ts +++ b/js/core/src/reflection.ts @@ -418,6 +418,11 @@ export class ReflectionServer { await this.writeRuntimeFile(); } catch (e) { logger.error(`Error initializing plugins: ${e}`); + try { + await this.stop(); + } catch (err) { + logger.error(`Failed to stop server gracefully: ${err}`); + } process.exit(1); } }); From 569805c34e00ac38f5b94a90a1792ee6cda99a45 Mon Sep 17 00:00:00 2001 From: Pavel Jbanov Date: Thu, 22 Jan 2026 12:31:01 -0500 Subject: [PATCH 3/3] Apply suggestion from @pavelgj --- js/core/src/reflection.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/js/core/src/reflection.ts b/js/core/src/reflection.ts index 421dae2281..7b5fef2062 100644 --- a/js/core/src/reflection.ts +++ b/js/core/src/reflection.ts @@ -423,7 +423,6 @@ export class ReflectionServer { } catch (err) { logger.error(`Failed to stop server gracefully: ${err}`); } - process.exit(1); } }); }