Skip to content

Commit 592720c

Browse files
committed
keep the flowing going even on error
1 parent 861ca85 commit 592720c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

77-cloudant-cf.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,18 @@ module.exports = function(RED) {
247247
function sendDocumentOnPayload(err, body, msg) {
248248
if (!err) {
249249
msg.payload = body;
250-
node.send(msg);
251250
} else {
251+
msg.payload = null;
252+
252253
if (err.description === "missing") {
253254
node.warn("Document '" + node.payloadIn+ "' not found in database '" +
254255
node.database + "'.");
255256
} else {
256257
node.error(err.reason);
257258
}
258259
}
260+
261+
node.send(msg);
259262
}
260263
}
261264
RED.nodes.registerType("cloudant in", CloudantInNode);

0 commit comments

Comments
 (0)