1
0
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:
Nick O'Leary 2014-10-30 08:44:08 +00:00
commit 7419f62a20

View File

@ -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 {