mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(Read Binary File Node): Do not crash the execution when the source file does not exist (#5100)
This issue was introduced in https://github.com/n8n-io/n8n/pull/5069
This commit is contained in:
committed by
GitHub
parent
c4df2049a8
commit
c97f3cad59
@@ -15,6 +15,7 @@ import type { WorkflowActivationError } from './WorkflowActivationError';
|
||||
import type { WorkflowOperationError } from './WorkflowErrors';
|
||||
import type { NodeApiError, NodeOperationError } from './NodeErrors';
|
||||
import type { ExpressionError } from './ExpressionError';
|
||||
import { PathLike } from 'fs';
|
||||
|
||||
export interface IAdditionalCredentialOptions {
|
||||
oauth2?: IOAuth2Options;
|
||||
@@ -640,6 +641,10 @@ export interface JsonHelperFunctions {
|
||||
returnJsonArray(jsonData: IDataObject | IDataObject[]): INodeExecutionData[];
|
||||
}
|
||||
|
||||
export interface FileSystemHelperFunctions {
|
||||
createReadStream(path: PathLike): Promise<Readable>;
|
||||
}
|
||||
|
||||
export interface BinaryHelperFunctions {
|
||||
prepareBinaryData(
|
||||
binaryData: Buffer | Readable,
|
||||
@@ -725,6 +730,7 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||
|
||||
helpers: RequestHelperFunctions &
|
||||
BinaryHelperFunctions &
|
||||
FileSystemHelperFunctions &
|
||||
JsonHelperFunctions & {
|
||||
normalizeItems(items: INodeExecutionData | INodeExecutionData[]): INodeExecutionData[];
|
||||
constructExecutionMetaData(
|
||||
|
||||
@@ -217,6 +217,7 @@ abstract class NodeError extends ExecutionBaseError {
|
||||
}
|
||||
|
||||
interface NodeOperationErrorOptions {
|
||||
message?: string;
|
||||
description?: string;
|
||||
runIndex?: number;
|
||||
itemIndex?: number;
|
||||
@@ -234,6 +235,9 @@ export class NodeOperationError extends NodeError {
|
||||
}
|
||||
super(node, error);
|
||||
|
||||
if (options.message) {
|
||||
this.message = options.message;
|
||||
}
|
||||
this.description = options.description;
|
||||
this.context.runIndex = options.runIndex;
|
||||
this.context.itemIndex = options.itemIndex;
|
||||
|
||||
Reference in New Issue
Block a user