fix(Read/Write Files from Disk Node): Better error handling when file name missing (no-changelog) (#10463)

This commit is contained in:
Shireen Missi
2024-08-19 13:07:39 +01:00
committed by GitHub
parent 17ac7844f2
commit 6a0f2ca96b
2 changed files with 16 additions and 6 deletions

View File

@@ -1,6 +1,11 @@
import type { Readable } from 'stream';
import type { IExecuteFunctions, INodeExecutionData, INodeProperties } from 'n8n-workflow';
import { BINARY_ENCODING } from 'n8n-workflow';
import type {
IExecuteFunctions,
INodeExecutionData,
INodeProperties,
JsonObject,
} from 'n8n-workflow';
import { BINARY_ENCODING, NodeApiError } from 'n8n-workflow';
import { errorMapper } from '../helpers/utils';
import { updateDisplayOptions } from '@utils/utilities';
@@ -114,7 +119,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData
});
continue;
}
throw nodeOperatioinError;
throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex });
}
}