mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Merge pull request #461 from hindessm/fix-tweet-post-error-reporting
Fix tweet post error reporting.
This commit is contained in:
commit
7419f62a20
@ -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