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

don't let through pusher error

to close #548
This commit is contained in:
Dave Conway-Jones 2019-06-18 08:52:55 +01:00
parent 88ee43186c
commit 587ff6b8e6
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 6 additions and 4 deletions

View File

@ -99,9 +99,11 @@ module.exports = function(RED) {
function pushMessage(pushmsg) { function pushMessage(pushmsg) {
pusher.send( pushmsg, function(err, response) { pusher.send( pushmsg, function(err, response) {
if (err) { node.error("[57-pushover.js] Error: "+err); } if (err) { node.error(err); }
response = JSON.parse(response); else {
if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); } response = JSON.parse(response);
if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); }
}
}); });
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pushover", "name" : "node-red-node-pushover",
"version" : "0.0.14", "version" : "0.0.15",
"description" : "A Node-RED node to send alerts via Pushover", "description" : "A Node-RED node to send alerts via Pushover",
"dependencies" : { "dependencies" : {
"pushover-notifications" : "^1.2.0" "pushover-notifications" : "^1.2.0"