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:
parent
5f1513bed3
commit
5fe8f83bc5
@ -30,7 +30,9 @@ module.exports = function(RED) {
|
|||||||
if (typeof(msg.payload) === 'object') {
|
if (typeof(msg.payload) === 'object') {
|
||||||
msg.payload = JSON.stringify(msg.payload);
|
msg.payload = JSON.stringify(msg.payload);
|
||||||
}
|
}
|
||||||
else { msg.payload = msg.payload.toString(); }
|
else {
|
||||||
|
msg.payload = msg.payload.toString();
|
||||||
|
}
|
||||||
if (node.pushkey) {
|
if (node.pushkey) {
|
||||||
nma({
|
nma({
|
||||||
"apikey": node.pushkey,
|
"apikey": node.pushkey,
|
||||||
@ -40,7 +42,7 @@ module.exports = function(RED) {
|
|||||||
"priority": 0
|
"priority": 0
|
||||||
}, function (error) {
|
}, function (error) {
|
||||||
if (error) {
|
if (error) {
|
||||||
node.warn("NMA error: " + error);
|
node.error("NMA error: " + error,msg);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-nma",
|
"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",
|
"description" : "A Node-RED node to send alerts via Notify-My-Android",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"nma" : "0.2.2"
|
"nma" : "0.2.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user