node-red/packages/node_modules/@node-red/nodes/core
Dennis Bosmans 96bef841a0 fix: prevent uncaught exceptions in core node event handlers
Added try-catch blocks and null checks to event handlers in core nodes
to prevent uncaught exceptions from crashing the Node-RED runtime.

Changes per node:

**TCP (31-tcpin.js)**
- Wrapped all `on('data')` handlers in try-catch (TcpIn client/server, TcpGet)

**UDP (32-udp.js)**
- Wrapped `on('message')` handler in try-catch

**Exec (90-exec.js)**
- Wrapped stdout/stderr `on('data')` handlers in try-catch

**WebSocket (22-websocket.js)**
- Wrapped send() loop in handleEvent() with try-catch

**MQTT (10-mqtt.js)**
- Added null check for packet parameter in subscriptionHandler()
- Wrapped subscription handler callback in try-catch
- Added null check for mpacket.properties

Without these protections, malformed data or unexpected errors in async
event handlers could cause uncaught exceptions that crash the entire
Node-RED process.
2026-01-16 22:22:11 +01:00
..
common Fix status node to retrieve status from all nodes 2026-01-04 16:17:16 +09:00
function fix: prevent uncaught exceptions in core node event handlers 2026-01-16 22:22:11 +01:00
network fix: prevent uncaught exceptions in core node event handlers 2026-01-16 22:22:11 +01:00
parsers Merge branch 'master' into dev 2025-03-17 16:07:46 +00:00
sequence fix test 2025-08-20 19:12:09 +01:00
storage Apply suggestions from code review 2026-01-07 15:07:54 +00:00