mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Fix not shown error (#692)
Fixed response to shown as string and not object
This commit is contained in:
parent
d3a3bc158c
commit
e980c8c04d
@ -103,8 +103,8 @@ module.exports = function(RED) {
|
|||||||
if (err) { node.error(err,msg); }
|
if (err) { node.error(err,msg); }
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
response = JSON.parse(response);
|
var responseObject = JSON.parse(response);
|
||||||
if (response.status !== 1) { node.error("[57-pushover.js] Error: "+response); }
|
if (responseObject.status !== 1) { node.error("[57-pushover.js] Error: "+response); }
|
||||||
}
|
}
|
||||||
catch(e) {
|
catch(e) {
|
||||||
node.error("[57-pushover.js] Error: "+response);
|
node.error("[57-pushover.js] Error: "+response);
|
||||||
|
Loading…
Reference in New Issue
Block a user