mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00: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:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user