mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
Let nam node actual create error event
(rather than just warn…)
This commit is contained in:
@@ -30,7 +30,9 @@ module.exports = function(RED) {
|
||||
if (typeof(msg.payload) === 'object') {
|
||||
msg.payload = JSON.stringify(msg.payload);
|
||||
}
|
||||
else { msg.payload = msg.payload.toString(); }
|
||||
else {
|
||||
msg.payload = msg.payload.toString();
|
||||
}
|
||||
if (node.pushkey) {
|
||||
nma({
|
||||
"apikey": node.pushkey,
|
||||
@@ -40,7 +42,7 @@ module.exports = function(RED) {
|
||||
"priority": 0
|
||||
}, function (error) {
|
||||
if (error) {
|
||||
node.warn("NMA error: " + error);
|
||||
node.error("NMA error: " + error,msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user