From b9701db57863ff3062190428745748e708a6120b Mon Sep 17 00:00:00 2001 From: tamasvar <41537421+tamasvar@users.noreply.github.com> Date: Wed, 11 Jan 2023 08:08:12 +0100 Subject: [PATCH] I need error msg I still need the msg.payload when there is an error, not only when everything is going well. --- storage/mysql/68-mysql.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/mysql/68-mysql.js b/storage/mysql/68-mysql.js index 87dad1b3..0698e8d9 100644 --- a/storage/mysql/68-mysql.js +++ b/storage/mysql/68-mysql.js @@ -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);