1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

I need error msg

I still need the msg.payload when there is an error, not only when everything is going well.
This commit is contained in:
tamasvar 2023-01-11 08:08:12 +01:00 committed by GitHub
parent 9bae313b72
commit b9701db578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,8 @@ module.exports = function(RED) {
conn.query(msg.topic, bind, function (err, rows) {
conn.release()
if (err) {
msg.payload = rows;
send(msg);
status = { fill: "red", shape: "ring", text: RED._("mysql.status.error") + ": " + err.code };
node.status(status);
node.error(err, msg);