From bc511d221db1509647541227ab12bbb351fb3ca1 Mon Sep 17 00:00:00 2001 From: linuztx Date: Tue, 31 Mar 2026 09:07:46 +0800 Subject: [PATCH] fix: stop poll loop immediately when Node.js is not installed --- .../extensions/python/job_loop/_10_wa_poll.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/_whatsapp_integration/extensions/python/job_loop/_10_wa_poll.py b/plugins/_whatsapp_integration/extensions/python/job_loop/_10_wa_poll.py index 522cbf2e2..13449c621 100644 --- a/plugins/_whatsapp_integration/extensions/python/job_loop/_10_wa_poll.py +++ b/plugins/_whatsapp_integration/extensions/python/job_loop/_10_wa_poll.py @@ -80,6 +80,12 @@ async def _poll_loop() -> None: consecutive_failures = 0 else: consecutive_failures += 1 + except FileNotFoundError: + PrintStyle.error( + "WhatsApp: Node.js is not installed. " + "Stopping poll loop — install Node.js and re-enable the plugin." + ) + break except Exception as e: consecutive_failures += 1 PrintStyle.error(f"WhatsApp bridge start error: {format_error(e)}")