From f2236ba38c106cbb457764b973fc92ead3b207fa Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Thu, 19 Dec 2019 17:58:55 -0600 Subject: [PATCH] :zap: Make WriteBinaryFile-Node error when data is missing --- packages/nodes-base/nodes/WriteBinaryFile.node.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/WriteBinaryFile.node.ts b/packages/nodes-base/nodes/WriteBinaryFile.node.ts index faabd99475..2bcb8f8e9b 100644 --- a/packages/nodes-base/nodes/WriteBinaryFile.node.ts +++ b/packages/nodes-base/nodes/WriteBinaryFile.node.ts @@ -60,11 +60,11 @@ export class WriteBinaryFile implements INodeType { const fileName = this.getNodeParameter('fileName') as string; if (item.binary === undefined) { - return item; + throw new Error('No binary data set. So file can not be written!'); } if (item.binary[dataPropertyName] === undefined) { - return item; + throw new Error(`The binary property "${dataPropertyName}" does not exist. So no file can be written!`); } // Write the file to disk