Skip to content

Commit

Permalink
I need error msg
Browse files Browse the repository at this point in the history
I still need the msg.payload when there is an error, not only when everything is going well.
  • Loading branch information
tamasvar authored Jan 11, 2023
1 parent 9bae313 commit b9701db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions storage/mysql/68-mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b9701db

Please sign in to comment.