From 1860182420807a4d09014cf238f6d8eeb01146b2 Mon Sep 17 00:00:00 2001 From: tamasvar Date: Thu, 2 Feb 2023 09:04:18 +0100 Subject: [PATCH] I fixed it. I thought that even if there is an error, send a message. --- storage/mysql/68-mysql.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/mysql/68-mysql.js b/storage/mysql/68-mysql.js index 0698e8d9..1bfcdfec 100644 --- a/storage/mysql/68-mysql.js +++ b/storage/mysql/68-mysql.js @@ -142,7 +142,7 @@ module.exports = function(RED) { conn.query(msg.topic, bind, function (err, rows) { conn.release() if (err) { - msg.payload = rows; + msg.error = err; send(msg); status = { fill: "red", shape: "ring", text: RED._("mysql.status.error") + ": " + err.code }; node.status(status);