Skip to content

Commit

Permalink
⚡ Make WriteBinaryFile-Node error when data is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
janober committed Dec 19, 2019
1 parent 99c1324 commit f2236ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nodes-base/nodes/WriteBinaryFile.node.ts
Expand Up @@ -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
Expand Down

0 comments on commit f2236ba

Please sign in to comment.