Make WriteBinaryFile-Node error when data is missing

This commit is contained in:
Jan Oberhauser 2019-12-19 17:58:55 -06:00
parent 99c13249db
commit f2236ba38c

View file

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