Update 68-mysql.js

Send msg to secondary output in case of error
This commit is contained in:
jonbdk
2024-04-23 01:18:01 +02:00
committed by GitHub
parent 97688b4cda
commit 8d7efe683f

View File

@@ -145,6 +145,7 @@ module.exports = function(RED) {
status = { fill: "red", shape: "ring", text: RED._("mysql.status.error") + ": " + err.code }; status = { fill: "red", shape: "ring", text: RED._("mysql.status.error") + ": " + err.code };
node.status(status); node.status(status);
node.error(err, msg); node.error(err, msg);
send([null, { query: msg.topic, payload: 'ERROR', error: err }]);
} }
else { else {
msg.payload = rows; msg.payload = rows;