1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Let nam node actual create error event

(rather than just warn…)
This commit is contained in:
Dave Conway-Jones 2015-12-17 17:15:43 +00:00
parent 5f1513bed3
commit 5fe8f83bc5
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}
});
}

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-nma",
"version" : "0.0.6",
"version" : "0.0.7",
"description" : "A Node-RED node to send alerts via Notify-My-Android",
"dependencies" : {
"nma" : "0.2.2"