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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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