Skip to content

Commit cf3a250

Browse files
kazuhitoyokoiHiroyasuNishiyama
authored andcommitted
Fix node.error() handling (#82)
1 parent f32c781 commit cf3a250

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/swagger/node.js.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ module.exports = function (RED) {
6969
parameters.{{&camelCaseName}} = msg.payload;
7070
} else {
7171
node.error('Unsupported type: \'' + (typeof msg.payload) + '\', '
72-
+ 'msg.payload must be JSON object or buffer.');
72+
+ 'msg.payload must be JSON object or buffer.', msg);
7373
errorFlag = true;
7474
}
7575
{{/isBodyParam}}
@@ -93,7 +93,7 @@ module.exports = function (RED) {
9393
node.send(msg);
9494
node.status({});
9595
}).catch(function (error) {
96-
node.error(error);
96+
node.error(error, msg);
9797
node.status({ fill: "red", shape: "ring", text: "node-red:common.status.error" });
9898
});
9999
}

0 commit comments

Comments
 (0)