diff --git a/social/pushover/57-pushover.js b/social/pushover/57-pushover.js index f32ff8cb..c16770c5 100644 --- a/social/pushover/57-pushover.js +++ b/social/pushover/57-pushover.js @@ -99,9 +99,11 @@ module.exports = function(RED) { function pushMessage(pushmsg) { pusher.send( pushmsg, function(err, response) { - if (err) { node.error("[57-pushover.js] Error: "+err); } - response = JSON.parse(response); - if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); } + if (err) { node.error(err); } + else { + response = JSON.parse(response); + if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); } + } }); } } diff --git a/social/pushover/package.json b/social/pushover/package.json index 60ab9743..929e5c25 100644 --- a/social/pushover/package.json +++ b/social/pushover/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pushover", - "version" : "0.0.14", + "version" : "0.0.15", "description" : "A Node-RED node to send alerts via Pushover", "dependencies" : { "pushover-notifications" : "^1.2.0"