mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix tweet post error reporting.
This commit is contained in:
parent
aff8a7802a
commit
f06b52625f
@ -264,8 +264,8 @@ module.exports = function(RED) {
|
||||
node.status({fill:"red",shape:"ring",text:"failed"});
|
||||
} else {
|
||||
var response = JSON.parse(body);
|
||||
if (body.errors) {
|
||||
var errorList = body.errors.map(function(er) { return er.code+": "+er.message }).join(", ");
|
||||
if (response.errors) {
|
||||
var errorList = response.errors.map(function(er) { return er.code+": "+er.message }).join(", ");
|
||||
node.error("tweet failed: "+errorList);
|
||||
node.status({fill:"red",shape:"ring",text:"failed"});
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user