Skip to content

Commit

Permalink
Show error message instead of internal error
Browse files Browse the repository at this point in the history
  • Loading branch information
ShireenMissi committed Aug 16, 2024
1 parent aea82cb commit b994826
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -114,7 +119,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData
});
continue;
}
throw nodeOperatioinError;
throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex });
}
}

Expand Down

0 comments on commit b994826

Please sign in to comment.