diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ConversationalAgent/execute.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ConversationalAgent/execute.ts index 3749547f83..7693945a70 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ConversationalAgent/execute.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ConversationalAgent/execute.ts @@ -114,7 +114,7 @@ export async function conversationalAgentExecute( } catch (error) { throwIfToolSchema(this, error); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } }); continue; } diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.ts index 5a58b9a46d..a027829e3a 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/OpenAiFunctionsAgent/execute.ts @@ -116,7 +116,7 @@ export async function openAiFunctionsAgentExecute( returnData.push({ json: response }); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } }); continue; } diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.ts index d0cc3a90a8..7aa22d8476 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/PlanAndExecuteAgent/execute.ts @@ -93,7 +93,7 @@ export async function planAndExecuteAgentExecute( returnData.push({ json: response }); } catch (error) { throwIfToolSchema(this, error); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } }); continue; } diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ReActAgent/execute.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ReActAgent/execute.ts index eec38ed9fd..bc012c5201 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ReActAgent/execute.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ReActAgent/execute.ts @@ -114,7 +114,7 @@ export async function reActAgentAgentExecute( returnData.push({ json: response }); } catch (error) { throwIfToolSchema(this, error); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } }); continue; } diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts index 1820c0e911..15ef523338 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/SqlAgent/execute.ts @@ -142,7 +142,7 @@ export async function sqlAgentAgentExecute( returnData.push({ json: response }); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i } }); continue; } diff --git a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts index 603f5afb66..7325628e54 100644 --- a/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts +++ b/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/execute.ts @@ -181,11 +181,8 @@ export async function toolsAgentExecute(this: IExecuteFunctions): Promise executeData, - continueOnFail: () => continueOnFail(node), + continueOnFail: (error?: Error) => { + const shouldContinue = continueOnFail(node); + if (error && shouldContinue && !(error instanceof ApplicationError)) { + error.message = OBFUSCATED_ERROR_MESSAGE; + } + return shouldContinue; + }, evaluateExpression: (expression: string, itemIndex: number) => { return workflow.expression.resolveSimpleParameterValue( `=${expression}`, diff --git a/packages/core/src/WorkflowExecute.ts b/packages/core/src/WorkflowExecute.ts index 10a34fab4b..3adab1a766 100644 --- a/packages/core/src/WorkflowExecute.ts +++ b/packages/core/src/WorkflowExecute.ts @@ -44,6 +44,7 @@ import { ApplicationError, NodeExecutionOutput, sleep, + OBFUSCATED_ERROR_MESSAGE, } from 'n8n-workflow'; import get from 'lodash/get'; import * as NodeExecuteFunctions from './NodeExecuteFunctions'; @@ -1304,13 +1305,12 @@ export class WorkflowExecute { } catch (error) { this.runExecutionData.resultData.lastNodeExecuted = executionData.node.name; + const message = + error instanceof ApplicationError ? error.message : OBFUSCATED_ERROR_MESSAGE; + const e = error as unknown as ExecutionBaseError; - executionError = { - ...e, - message: e.message, - stack: e.stack, - }; + executionError = { ...e, message, stack: e.stack }; Logger.debug(`Running node "${executionNode.name}" finished with error`, { node: executionNode.name, diff --git a/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts b/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts index 7c2089ce16..5e6215e413 100644 --- a/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts +++ b/packages/nodes-base/nodes/ActionNetwork/ActionNetwork.node.ts @@ -487,7 +487,7 @@ export class ActionNetwork implements INodeType { ? returnData.push(...(response as IDataObject[])) : returnData.push(response as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts index e961b4df7c..6f048f9f3c 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts @@ -1190,7 +1190,7 @@ export class ActiveCampaign implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Affinity/Affinity.node.ts b/packages/nodes-base/nodes/Affinity/Affinity.node.ts index f80a7312a8..74a1e7f58e 100644 --- a/packages/nodes-base/nodes/Affinity/Affinity.node.ts +++ b/packages/nodes-base/nodes/Affinity/Affinity.node.ts @@ -420,7 +420,7 @@ export class Affinity implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts index 22517772d8..3ce3a8ce72 100644 --- a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts +++ b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts @@ -653,7 +653,7 @@ export class AirtableV1 implements INodeType { rows.length = 0; } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } @@ -696,7 +696,7 @@ export class AirtableV1 implements INodeType { rows.length = 0; } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } @@ -757,7 +757,7 @@ export class AirtableV1 implements INodeType { }), ]; } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); } else { throw error; @@ -792,7 +792,7 @@ export class AirtableV1 implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } @@ -880,7 +880,7 @@ export class AirtableV1 implements INodeType { rows.length = 0; } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts index aa791f7b64..fae52ba66e 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/base/getSchema.operation.ts @@ -48,7 +48,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { error = processAirtableError(error as NodeApiError, undefined, i); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts index 758c3b7a2f..3686e33bff 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/create.operation.ts @@ -87,7 +87,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { error = processAirtableError(error as NodeApiError, undefined, i); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { message: error.message, error } }); continue; } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts index cbbf12ba3c..100590fc5a 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/deleteRecord.operation.ts @@ -55,7 +55,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { error = processAirtableError(error as NodeApiError, id, i); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts index 9742382cdd..081accfabe 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/get.operation.ts @@ -91,7 +91,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { error = processAirtableError(error as NodeApiError, id, i); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts index 05a26e29a8..f23a6a3453 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/search.operation.ts @@ -227,7 +227,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { message: error.message, error }, pairedItem: { item: i } }); continue; } else { diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts index d2c4172dd5..cc9d785cfc 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/update.operation.ts @@ -138,7 +138,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { error = processAirtableError(error as NodeApiError, recordId, i); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { message: error.message, error } }); continue; } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts b/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts index e6266480ce..27f9314cbc 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/record/upsert.operation.ts @@ -148,7 +148,7 @@ export async function execute( returnData.push(...executionData); } catch (error) { error = processAirtableError(error as NodeApiError, undefined, i); - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { message: error.message, error } }); continue; } diff --git a/packages/nodes-base/nodes/Amqp/Amqp.node.ts b/packages/nodes-base/nodes/Amqp/Amqp.node.ts index f917547d6b..e6e49ba1aa 100644 --- a/packages/nodes-base/nodes/Amqp/Amqp.node.ts +++ b/packages/nodes-base/nodes/Amqp/Amqp.node.ts @@ -227,7 +227,7 @@ export class Amqp implements INodeType { return [this.helpers.returnJsonArray(responseData)]; } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { return [this.helpers.returnJsonArray({ error: error.message })]; } else { throw error; diff --git a/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts b/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts index 480a0ec0de..b7fe475dad 100644 --- a/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts +++ b/packages/nodes-base/nodes/ApiTemplateIo/ApiTemplateIo.node.ts @@ -385,7 +385,7 @@ export class ApiTemplateIo implements INodeType { returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } @@ -471,7 +471,7 @@ export class ApiTemplateIo implements INodeType { } returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } @@ -561,7 +561,7 @@ export class ApiTemplateIo implements INodeType { } returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Asana/Asana.node.ts b/packages/nodes-base/nodes/Asana/Asana.node.ts index a30897551c..a2ce21a29b 100644 --- a/packages/nodes-base/nodes/Asana/Asana.node.ts +++ b/packages/nodes-base/nodes/Asana/Asana.node.ts @@ -2425,7 +2425,7 @@ export class Asana implements INodeType { ), ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts index fedcd86ebb..bdf287d1f1 100644 --- a/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts +++ b/packages/nodes-base/nodes/Autopilot/Autopilot.node.ts @@ -305,7 +305,7 @@ export class Autopilot implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const exectionErrorWithMetaData = this.helpers.constructExecutionMetaData( [{ json: { error: error.message } }], { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Aws/AwsLambda.node.ts b/packages/nodes-base/nodes/Aws/AwsLambda.node.ts index f5404f6522..e1fd51f130 100644 --- a/packages/nodes-base/nodes/Aws/AwsLambda.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsLambda.node.ts @@ -200,7 +200,7 @@ export class AwsLambda implements INodeType { } as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: (error as JsonObject).message }); continue; } diff --git a/packages/nodes-base/nodes/Aws/AwsSns.node.ts b/packages/nodes-base/nodes/Aws/AwsSns.node.ts index cde82e341a..a11447be8b 100644 --- a/packages/nodes-base/nodes/Aws/AwsSns.node.ts +++ b/packages/nodes-base/nodes/Aws/AwsSns.node.ts @@ -317,7 +317,7 @@ export class AwsSns implements INodeType { } as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts index 493e240a70..1ce0271e09 100644 --- a/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts +++ b/packages/nodes-base/nodes/Aws/CertificateManager/AwsCertificateManager.node.ts @@ -222,7 +222,7 @@ export class AwsCertificateManager implements INodeType { returnData.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts b/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts index d86ecc77cd..4a3f1790ce 100644 --- a/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts +++ b/packages/nodes-base/nodes/Aws/Comprehend/AwsComprehend.node.ts @@ -276,7 +276,7 @@ export class AwsComprehend implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts index 392f04e0cc..4340dd7c16 100644 --- a/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts +++ b/packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts @@ -398,7 +398,7 @@ export class AwsDynamoDB implements INodeType { returnData.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts index b8101fd572..539f0c7761 100644 --- a/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts +++ b/packages/nodes-base/nodes/Aws/ELB/AwsElb.node.ts @@ -450,7 +450,7 @@ export class AwsElb implements INodeType { ), ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: (error as JsonObject).toString() }); continue; } diff --git a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts index 405b26637d..34c08e2073 100644 --- a/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts +++ b/packages/nodes-base/nodes/Aws/Rekognition/AwsRekognition.node.ts @@ -454,7 +454,7 @@ export class AwsRekognition implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts b/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts index 51dffe4366..afa888deea 100644 --- a/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/V1/AwsS3V1.node.ts @@ -893,7 +893,7 @@ export class AwsS3V1 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts b/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts index 7f198797de..075277eccc 100644 --- a/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts +++ b/packages/nodes-base/nodes/Aws/S3/V2/AwsS3V2.node.ts @@ -1057,7 +1057,7 @@ export class AwsS3V2 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts index 656961f8a7..1ca1028f35 100644 --- a/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts +++ b/packages/nodes-base/nodes/Aws/SES/AwsSes.node.ts @@ -1286,7 +1286,7 @@ export class AwsSes implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts index bfd9d7fc1d..7911b5419f 100644 --- a/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts +++ b/packages/nodes-base/nodes/Aws/SQS/AwsSqs.node.ts @@ -378,7 +378,7 @@ export class AwsSqs implements INodeType { const result = responseData.SendMessageResponse.SendMessageResult; returnData.push(result as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.description }); continue; } diff --git a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts index 3ee983f843..ebb845f3b9 100644 --- a/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts +++ b/packages/nodes-base/nodes/Aws/Textract/AwsTextract.node.ts @@ -143,7 +143,7 @@ export class AwsTextract implements INodeType { returnData.push(responseData as unknown as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts b/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts index 01e8b19ea0..a5cfebd761 100644 --- a/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts +++ b/packages/nodes-base/nodes/Aws/Transcribe/AwsTranscribe.node.ts @@ -539,7 +539,7 @@ export class AwsTranscribe implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts b/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts index 9e8cb85a9e..4d3f434a2a 100644 --- a/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts +++ b/packages/nodes-base/nodes/BambooHr/v1/actions/router.ts @@ -39,7 +39,7 @@ export async function router(this: IExecuteFunctions): Promise { x.json.error = error.reason || 'LDAP connection error occurred'; @@ -418,7 +418,7 @@ export class Ldap implements INodeType { ); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnItems.push({ json: items[itemIndex].json, error, pairedItem: itemIndex }); } else { await client.unbind(); diff --git a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts index 2f8652655c..49dd8e7136 100644 --- a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts +++ b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts @@ -288,7 +288,7 @@ export class Lemlist implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Line/Line.node.ts b/packages/nodes-base/nodes/Line/Line.node.ts index 1d157670ef..4756fd0d4b 100644 --- a/packages/nodes-base/nodes/Line/Line.node.ts +++ b/packages/nodes-base/nodes/Line/Line.node.ts @@ -128,7 +128,7 @@ export class Line implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Linear/Linear.node.ts b/packages/nodes-base/nodes/Linear/Linear.node.ts index 6bbc784fe3..5852ce150e 100644 --- a/packages/nodes-base/nodes/Linear/Linear.node.ts +++ b/packages/nodes-base/nodes/Linear/Linear.node.ts @@ -298,7 +298,7 @@ export class Linear implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts index cbccc27631..c434cd2372 100644 --- a/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts +++ b/packages/nodes-base/nodes/LinkedIn/LinkedIn.node.ts @@ -276,7 +276,7 @@ export class LinkedIn implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts b/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts index 0b66ff0348..3f0a78e70b 100644 --- a/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts +++ b/packages/nodes-base/nodes/LoneScale/LoneScale.node.ts @@ -465,7 +465,7 @@ export class LoneScale implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Magento/Magento2.node.ts b/packages/nodes-base/nodes/Magento/Magento2.node.ts index c9daf7e795..286086cb08 100644 --- a/packages/nodes-base/nodes/Magento/Magento2.node.ts +++ b/packages/nodes-base/nodes/Magento/Magento2.node.ts @@ -800,7 +800,7 @@ export class Magento2 implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts b/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts index fcf7d5d551..5278211bfd 100644 --- a/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts +++ b/packages/nodes-base/nodes/Mailcheck/Mailcheck.node.ts @@ -97,7 +97,7 @@ export class Mailcheck implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts index 229f4626e5..dc8325d3ac 100644 --- a/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts +++ b/packages/nodes-base/nodes/Mailchimp/Mailchimp.node.ts @@ -2189,7 +2189,7 @@ export class Mailchimp implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts b/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts index 40a1f976ea..d23ec1ebb7 100644 --- a/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts +++ b/packages/nodes-base/nodes/MailerLite/MailerLite.node.ts @@ -181,7 +181,7 @@ export class MailerLite implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts b/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts index 24e151d349..f92c1918b1 100644 --- a/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts +++ b/packages/nodes-base/nodes/Mailgun/Mailgun.node.ts @@ -194,7 +194,7 @@ export class Mailgun implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: itemIndex } }, diff --git a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts index b374292333..f46bf8a6df 100644 --- a/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts +++ b/packages/nodes-base/nodes/Mailjet/Mailjet.node.ts @@ -310,7 +310,7 @@ export class Mailjet implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts index ab740ed87d..13da57be9e 100644 --- a/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts +++ b/packages/nodes-base/nodes/Mandrill/Mandrill.node.ts @@ -891,7 +891,7 @@ export class Mandrill implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Markdown/Markdown.node.ts b/packages/nodes-base/nodes/Markdown/Markdown.node.ts index 82272a44e5..6289fbab69 100644 --- a/packages/nodes-base/nodes/Markdown/Markdown.node.ts +++ b/packages/nodes-base/nodes/Markdown/Markdown.node.ts @@ -608,7 +608,7 @@ export class Markdown implements INodeType { returnData.push(newItem); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: (error as JsonObject).message }); continue; } diff --git a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts index b59da5ffdb..247b713dce 100644 --- a/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts +++ b/packages/nodes-base/nodes/Marketstack/Marketstack.node.ts @@ -161,7 +161,7 @@ export class Marketstack implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Matrix/Matrix.node.ts b/packages/nodes-base/nodes/Matrix/Matrix.node.ts index 5cdb8917aa..eb29563808 100644 --- a/packages/nodes-base/nodes/Matrix/Matrix.node.ts +++ b/packages/nodes-base/nodes/Matrix/Matrix.node.ts @@ -150,7 +150,7 @@ export class Matrix implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts b/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts index bd1af59af2..17ce9945fa 100644 --- a/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts +++ b/packages/nodes-base/nodes/Mattermost/v1/actions/router.ts @@ -42,7 +42,7 @@ export async function router(this: IExecuteFunctions): Promise result[0]) as unknown as IDataObject[], ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnItems = this.helpers.returnJsonArray({ error: error.message }); } else { await connection.end(); diff --git a/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts b/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts index 1e15ce71bb..daff2a131e 100644 --- a/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts +++ b/packages/nodes-base/nodes/MySql/v2/helpers/utils.ts @@ -264,7 +264,7 @@ export function configureQueryRunner( } catch (err) { const error = parseMySqlError.call(this, err, 0, formatedQueries); - if (!this.continueOnFail()) throw error; + if (!this.continueOnFail(err)) throw error; returnData.push({ json: { message: error.message, error: { ...error } } }); } } else { @@ -302,7 +302,7 @@ export function configureQueryRunner( } catch (err) { const error = parseMySqlError.call(this, err, index, [formatedQuery]); - if (!this.continueOnFail()) { + if (!this.continueOnFail(err)) { connection.release(); throw error; } @@ -352,7 +352,7 @@ export function configureQueryRunner( connection.release(); } - if (!this.continueOnFail()) throw error; + if (!this.continueOnFail(err)) throw error; returnData.push(prepareErrorItem(queries[index], error as Error, index)); // Return here because we already rolled back the transaction diff --git a/packages/nodes-base/nodes/Nasa/Nasa.node.ts b/packages/nodes-base/nodes/Nasa/Nasa.node.ts index ed8c825154..fab2fa8280 100644 --- a/packages/nodes-base/nodes/Nasa/Nasa.node.ts +++ b/packages/nodes-base/nodes/Nasa/Nasa.node.ts @@ -1110,7 +1110,7 @@ export class Nasa implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { if (resource === 'earthImagery' && operation === 'get') { items[i].json = { error: error.message }; } else if (resource === 'astronomyPictureOfTheDay' && operation === 'get' && download) { diff --git a/packages/nodes-base/nodes/Netlify/Netlify.node.ts b/packages/nodes-base/nodes/Netlify/Netlify.node.ts index 2621ef1a6b..4237c02db0 100644 --- a/packages/nodes-base/nodes/Netlify/Netlify.node.ts +++ b/packages/nodes-base/nodes/Netlify/Netlify.node.ts @@ -194,7 +194,7 @@ export class Netlify implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts index 83df6b9795..5ba8b7f5b6 100644 --- a/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts +++ b/packages/nodes-base/nodes/NextCloud/NextCloud.node.ts @@ -1099,7 +1099,7 @@ export class NextCloud implements INodeType { qs, ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { if (resource === 'file' && operation === 'download') { items[i].json = { error: error.message }; } else { @@ -1288,7 +1288,7 @@ export class NextCloud implements INodeType { returnData.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { if (resource === 'file' && operation === 'download') { items[i].json = { error: error.message }; } else { diff --git a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts index bfe3f4c090..e9f469eebe 100644 --- a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts +++ b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts @@ -396,7 +396,7 @@ export class NocoDB implements INodeType { returnData.push(...body); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.toString() }); } throw new NodeApiError(this.getNode(), error as JsonObject); @@ -459,7 +459,7 @@ export class NocoDB implements INodeType { returnData.push(...responseData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.toString() }); } throw new NodeApiError(this.getNode(), error as JsonObject); @@ -532,7 +532,7 @@ export class NocoDB implements INodeType { return [data]; } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.toString() } }); } else { throw error; @@ -608,7 +608,7 @@ export class NocoDB implements INodeType { newItems.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.toString() }), { itemData: { item: i } }, @@ -750,7 +750,7 @@ export class NocoDB implements INodeType { returnData.push(...body); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.toString() }); } throw new NodeApiError(this.getNode(), error as JsonObject); diff --git a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts index 6c5205f9d0..c69bb8ee7b 100644 --- a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts +++ b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts @@ -86,7 +86,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -161,7 +161,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -193,7 +193,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -236,7 +236,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -299,7 +299,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -386,7 +386,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -416,7 +416,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -511,7 +511,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -563,7 +563,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -589,7 +589,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -618,7 +618,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -652,7 +652,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -704,7 +704,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, @@ -766,7 +766,7 @@ export class NotionV2 implements INodeType { ); returnData = returnData.concat(executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: { item: i }, diff --git a/packages/nodes-base/nodes/Odoo/Odoo.node.ts b/packages/nodes-base/nodes/Odoo/Odoo.node.ts index 5bd254dcd4..051af948f7 100644 --- a/packages/nodes-base/nodes/Odoo/Odoo.node.ts +++ b/packages/nodes-base/nodes/Odoo/Odoo.node.ts @@ -751,7 +751,7 @@ export class Odoo implements INodeType { returnData.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts b/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts index 32445e0b1e..b678b2d51d 100644 --- a/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts +++ b/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts @@ -864,7 +864,7 @@ export class OneSimpleApi implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Onfleet/Onfleet.ts b/packages/nodes-base/nodes/Onfleet/Onfleet.ts index b5c17186c5..1c49d8908c 100644 --- a/packages/nodes-base/nodes/Onfleet/Onfleet.ts +++ b/packages/nodes-base/nodes/Onfleet/Onfleet.ts @@ -879,7 +879,7 @@ export class Onfleet { } } catch (error) { //@ts-ignore - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -923,7 +923,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'GET', path)); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -965,7 +965,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'GET', path)); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1022,7 +1022,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'GET', path)); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1085,7 +1085,7 @@ export class Onfleet { responseData.push({ success: true }); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1140,7 +1140,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'PUT', path, hubData)); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1259,7 +1259,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'POST', path, workerSchedule)); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1308,7 +1308,7 @@ export class Onfleet { responseData.push({ success: true }); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1366,7 +1366,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'PUT', path, { tasks, ...options })); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } @@ -1462,7 +1462,7 @@ export class Onfleet { responseData.push(await onfleetApiRequest.call(this, 'POST', path, teamAutoDispatch)); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { responseData.push({ error: (error as IDataObject).toString() }); continue; } diff --git a/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts b/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts index e4276118b9..c2e2f0a228 100644 --- a/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts +++ b/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts @@ -172,7 +172,7 @@ export class OpenThesaurus implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts b/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts index 3b9e4e6ff8..c9d58f8ea5 100644 --- a/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts +++ b/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts @@ -278,7 +278,7 @@ export class OpenWeatherMap implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Orbit/Orbit.node.ts b/packages/nodes-base/nodes/Orbit/Orbit.node.ts index 48069d2036..2949205423 100644 --- a/packages/nodes-base/nodes/Orbit/Orbit.node.ts +++ b/packages/nodes-base/nodes/Orbit/Orbit.node.ts @@ -531,7 +531,7 @@ export class Orbit implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Paddle/Paddle.node.ts b/packages/nodes-base/nodes/Paddle/Paddle.node.ts index 3f335307fe..39ad3142ff 100644 --- a/packages/nodes-base/nodes/Paddle/Paddle.node.ts +++ b/packages/nodes-base/nodes/Paddle/Paddle.node.ts @@ -520,7 +520,7 @@ export class Paddle implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts index fa7591d1e8..cebc859566 100644 --- a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts +++ b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts @@ -459,7 +459,7 @@ export class PagerDuty implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/PayPal/PayPal.node.ts b/packages/nodes-base/nodes/PayPal/PayPal.node.ts index 6ed04330bf..fe9ea711bc 100644 --- a/packages/nodes-base/nodes/PayPal/PayPal.node.ts +++ b/packages/nodes-base/nodes/PayPal/PayPal.node.ts @@ -242,7 +242,7 @@ export class PayPal implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts index afb351f9f2..a625444131 100644 --- a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts +++ b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts @@ -252,7 +252,7 @@ export class Phantombuster implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index c77967fcdb..b666d98588 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -4950,7 +4950,7 @@ export class Pipedrive implements INodeType { returnData.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { if (resource === 'file' && operation === 'download') { items[i].json = { error: error.message }; } else { diff --git a/packages/nodes-base/nodes/PostHog/PostHog.node.ts b/packages/nodes-base/nodes/PostHog/PostHog.node.ts index b1452310b7..4b44fee6b3 100644 --- a/packages/nodes-base/nodes/PostHog/PostHog.node.ts +++ b/packages/nodes-base/nodes/PostHog/PostHog.node.ts @@ -121,7 +121,7 @@ export class PostHog implements INodeType { returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } @@ -173,7 +173,7 @@ export class PostHog implements INodeType { returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); } else { throw error; @@ -217,7 +217,7 @@ export class PostHog implements INodeType { returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } @@ -273,7 +273,7 @@ export class PostHog implements INodeType { returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts index a153607cf9..19f2aaa27c 100644 --- a/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts +++ b/packages/nodes-base/nodes/ProfitWell/ProfitWell.node.ts @@ -138,7 +138,7 @@ export class ProfitWell implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts index ff4d4770c2..e918bc1352 100644 --- a/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts +++ b/packages/nodes-base/nodes/Pushbullet/Pushbullet.node.ts @@ -492,7 +492,7 @@ export class Pushbullet implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Pushover/Pushover.node.ts b/packages/nodes-base/nodes/Pushover/Pushover.node.ts index fab8ecdf80..d7d24f69b9 100644 --- a/packages/nodes-base/nodes/Pushover/Pushover.node.ts +++ b/packages/nodes-base/nodes/Pushover/Pushover.node.ts @@ -358,7 +358,7 @@ export class Pushover implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts index 33b94ab11e..b95189f478 100644 --- a/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts +++ b/packages/nodes-base/nodes/QuickBooks/QuickBooks.node.ts @@ -1119,7 +1119,7 @@ export class QuickBooks implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const download = this.getNodeParameter('download', 0, false); if ( ['invoice', 'estimate', 'payment'].includes(resource) && diff --git a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts index c0f98cd52d..3e5d047b90 100644 --- a/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts +++ b/packages/nodes-base/nodes/Raindrop/Raindrop.node.ts @@ -417,7 +417,7 @@ export class Raindrop implements INodeType { ? returnData.push(...(responseData as IDataObject[])) : returnData.push(responseData as IDataObject); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts index 13d5678b8f..a7e239d000 100644 --- a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts @@ -74,7 +74,7 @@ export class ReadBinaryFile implements INodeType { newItem.binary![dataPropertyName] = await this.helpers.prepareBinaryData(stream, filePath); returnData.push(newItem); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: (error as Error).message, diff --git a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts index ff882dfca5..6652ca191f 100644 --- a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts +++ b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts @@ -84,7 +84,7 @@ export class ReadPDF implements INodeType { json, }); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message, diff --git a/packages/nodes-base/nodes/Reddit/Reddit.node.ts b/packages/nodes-base/nodes/Reddit/Reddit.node.ts index 6c29f9791d..481ed75a91 100644 --- a/packages/nodes-base/nodes/Reddit/Reddit.node.ts +++ b/packages/nodes-base/nodes/Reddit/Reddit.node.ts @@ -428,7 +428,7 @@ export class Reddit implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts index 1b6e3b4822..075ad8a950 100644 --- a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts +++ b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts @@ -429,7 +429,7 @@ export class RespondToWebhook implements INodeType { this.sendResponse(response); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const itemData = generatePairedItemData(items.length); const returnData = this.helpers.constructExecutionMetaData( [{ json: { error: error.message } }], diff --git a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts index 623ba17788..9ef0551efa 100644 --- a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts +++ b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts @@ -483,7 +483,7 @@ export class Rocketchat implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts index 5eb9dc47aa..18f4d72dd4 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts @@ -137,7 +137,7 @@ export class RssFeedRead implements INodeType { returnData.push(...executionData); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message }, pairedItem: fallbackPairedItems || [{ item: i }], diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index d7844ba9a4..3751081cc6 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -883,7 +883,7 @@ export class S3 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { if (resource === 'file' && operation === 'download') { items[i].json = { error: error.message }; } else { diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index 4db839ba1d..badf507c51 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -3084,7 +3084,7 @@ export class Salesforce implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts index 4f8f55b856..3f5247d6ca 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts @@ -234,7 +234,7 @@ export class SeaTable implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -266,7 +266,7 @@ export class SeaTable implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -329,7 +329,7 @@ export class SeaTable implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -364,7 +364,7 @@ export class SeaTable implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -431,7 +431,7 @@ export class SeaTable implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Segment/Segment.node.ts b/packages/nodes-base/nodes/Segment/Segment.node.ts index 850df9bd40..9e878c5a14 100644 --- a/packages/nodes-base/nodes/Segment/Segment.node.ts +++ b/packages/nodes-base/nodes/Segment/Segment.node.ts @@ -616,7 +616,7 @@ export class Segment implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts index fd889ea057..69c83d889f 100644 --- a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts +++ b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts @@ -172,7 +172,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -213,7 +213,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -305,7 +305,7 @@ export class SendGrid implements INodeType { ); returnData.push(responseData as INodeExecutionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message } }); } else { throw error; @@ -334,7 +334,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -371,7 +371,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -402,7 +402,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -432,7 +432,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -463,7 +463,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -493,7 +493,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -641,7 +641,7 @@ export class SendGrid implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index 0e0d54ddf8..eae28e44f9 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -732,7 +732,7 @@ export class SentryIo implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index e76c557f50..9c634b0953 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -1138,7 +1138,7 @@ export class ServiceNow implements INodeType { }); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Set/v2/manual.mode.ts b/packages/nodes-base/nodes/Set/v2/manual.mode.ts index 282730bbf0..724a303336 100644 --- a/packages/nodes-base/nodes/Set/v2/manual.mode.ts +++ b/packages/nodes-base/nodes/Set/v2/manual.mode.ts @@ -249,7 +249,7 @@ export async function execute( ); return composeReturnItem.call(this, i, item, newData, options, node.typeVersion); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { return { json: { error: (error as Error).message, pairedItem: { item: i } } }; } throw new NodeOperationError(this.getNode(), error as Error, { diff --git a/packages/nodes-base/nodes/Set/v2/raw.mode.ts b/packages/nodes-base/nodes/Set/v2/raw.mode.ts index b24a5e2dd5..86aa11c750 100644 --- a/packages/nodes-base/nodes/Set/v2/raw.mode.ts +++ b/packages/nodes-base/nodes/Set/v2/raw.mode.ts @@ -56,7 +56,7 @@ export async function execute( return composeReturnItem.call(this, i, item, newData, options, node.typeVersion); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { return { json: { error: (error as Error).message }, pairedItem: { item: i } }; } throw new NodeOperationError(node, error as Error, { diff --git a/packages/nodes-base/nodes/Shopify/Shopify.node.ts b/packages/nodes-base/nodes/Shopify/Shopify.node.ts index 2baf13662a..5175dfe6fd 100644 --- a/packages/nodes-base/nodes/Shopify/Shopify.node.ts +++ b/packages/nodes-base/nodes/Shopify/Shopify.node.ts @@ -459,7 +459,7 @@ export class Shopify implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Signl4/Signl4.node.ts b/packages/nodes-base/nodes/Signl4/Signl4.node.ts index 58bb4e6aab..012ce4400a 100644 --- a/packages/nodes-base/nodes/Signl4/Signl4.node.ts +++ b/packages/nodes-base/nodes/Signl4/Signl4.node.ts @@ -342,7 +342,7 @@ export class Signl4 implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts index b247a0b810..5cae0a4350 100644 --- a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts +++ b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts @@ -1372,7 +1372,7 @@ export class SlackV1 implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: (error as JsonObject).message } }); continue; } diff --git a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts index 3029fea18d..40df76b8cd 100644 --- a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts +++ b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts @@ -1359,7 +1359,7 @@ export class SlackV2 implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: (error as JsonObject).message } }); continue; } diff --git a/packages/nodes-base/nodes/Sms77/Sms77.node.ts b/packages/nodes-base/nodes/Sms77/Sms77.node.ts index f5775eca1f..565e41c347 100644 --- a/packages/nodes-base/nodes/Sms77/Sms77.node.ts +++ b/packages/nodes-base/nodes/Sms77/Sms77.node.ts @@ -297,7 +297,7 @@ export class Sms77 implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Splunk/Splunk.node.ts b/packages/nodes-base/nodes/Splunk/Splunk.node.ts index 2e220fe1f7..fe9575912b 100644 --- a/packages/nodes-base/nodes/Splunk/Splunk.node.ts +++ b/packages/nodes-base/nodes/Splunk/Splunk.node.ts @@ -456,7 +456,7 @@ export class Splunk implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.cause.error }, pairedItem: { item: i } }); continue; } diff --git a/packages/nodes-base/nodes/Spontit/Spontit.node.ts b/packages/nodes-base/nodes/Spontit/Spontit.node.ts index a2e9475f9e..70f4baf5d0 100644 --- a/packages/nodes-base/nodes/Spontit/Spontit.node.ts +++ b/packages/nodes-base/nodes/Spontit/Spontit.node.ts @@ -102,7 +102,7 @@ export class Spontit implements INodeType { returnData.push(responseData as IDataObject); } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ error: error.message }); continue; } diff --git a/packages/nodes-base/nodes/Spotify/Spotify.node.ts b/packages/nodes-base/nodes/Spotify/Spotify.node.ts index 329d998da1..4da6196cc6 100644 --- a/packages/nodes-base/nodes/Spotify/Spotify.node.ts +++ b/packages/nodes-base/nodes/Spotify/Spotify.node.ts @@ -1313,7 +1313,7 @@ export class Spotify implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts index 3a57d58c23..9d5c71d7b8 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v1/SpreadsheetFileV1.node.ts @@ -155,7 +155,7 @@ export class SpreadsheetFileV1 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { newItems.push({ json: { error: error.message, @@ -242,7 +242,7 @@ export class SpreadsheetFileV1 implements INodeType { newItems.push(newItem); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { newItems.push({ json: { error: error.message, diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts b/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts index 719faeb478..de0e41ba61 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v2/fromFile.operation.ts @@ -209,7 +209,7 @@ export async function execute( error.message = `The file selected in 'Input Binary Field' is not in ${fileFormat} format`; errorDescription = `Try to change the operation or select a ${fileFormat} file in 'Input Binary Field'`; } - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message, diff --git a/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts b/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts index 61f8f8509e..85948b9915 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/v2/toFile.operation.ts @@ -29,7 +29,7 @@ export async function execute(this: IExecuteFunctions, items: INodeExecutionData returnData.push(newItem); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData.push({ json: { error: error.message, diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index a43a20f243..eaf193df65 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -466,7 +466,7 @@ export class Ssh implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { if (resource === 'file' && operation === 'download') { items[i] = { json: { diff --git a/packages/nodes-base/nodes/Stackby/Stackby.node.ts b/packages/nodes-base/nodes/Stackby/Stackby.node.ts index 608551fac0..5cccaf4521 100644 --- a/packages/nodes-base/nodes/Stackby/Stackby.node.ts +++ b/packages/nodes-base/nodes/Stackby/Stackby.node.ts @@ -192,7 +192,7 @@ export class Stackby implements INodeType { responseData.map((data: any) => data.field) as INodeExecutionData[], ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -228,7 +228,7 @@ export class Stackby implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -282,7 +282,7 @@ export class Stackby implements INodeType { responseData.map((data: any) => data.field) as INodeExecutionData[], ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const itemData = generatePairedItemData(items.length); const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), @@ -332,7 +332,7 @@ export class Stackby implements INodeType { responseData.map((data: any) => data.field) as INodeExecutionData[], ); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts index d6323156c5..c0c45609a7 100644 --- a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts +++ b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts @@ -348,7 +348,7 @@ export class Storyblok implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Strapi/Strapi.node.ts b/packages/nodes-base/nodes/Strapi/Strapi.node.ts index 4633e2819a..277f67e0d8 100644 --- a/packages/nodes-base/nodes/Strapi/Strapi.node.ts +++ b/packages/nodes-base/nodes/Strapi/Strapi.node.ts @@ -389,7 +389,7 @@ export class Strapi implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Strava/Strava.node.ts b/packages/nodes-base/nodes/Strava/Strava.node.ts index f637009e0f..d732a0f747 100644 --- a/packages/nodes-base/nodes/Strava/Strava.node.ts +++ b/packages/nodes-base/nodes/Strava/Strava.node.ts @@ -186,7 +186,7 @@ export class Strava implements INodeType { returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Stripe/Stripe.node.ts b/packages/nodes-base/nodes/Stripe/Stripe.node.ts index e50e35f30a..b1d02b9981 100644 --- a/packages/nodes-base/nodes/Stripe/Stripe.node.ts +++ b/packages/nodes-base/nodes/Stripe/Stripe.node.ts @@ -464,7 +464,7 @@ export class Stripe implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionErrorData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Supabase/Supabase.node.ts b/packages/nodes-base/nodes/Supabase/Supabase.node.ts index 9e025547bc..8a73f7a7c2 100644 --- a/packages/nodes-base/nodes/Supabase/Supabase.node.ts +++ b/packages/nodes-base/nodes/Supabase/Supabase.node.ts @@ -171,7 +171,7 @@ export class Supabase implements INodeType { returnData.push(...executionData); }); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.description }), { itemData: mapPairedItemsFrom(records) }, @@ -220,7 +220,7 @@ export class Supabase implements INodeType { try { rows = await supabaseApiRequest.call(this, 'DELETE', endpoint, {}, qs); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } }, @@ -260,7 +260,7 @@ export class Supabase implements INodeType { try { rows = await supabaseApiRequest.call(this, 'GET', endpoint, {}, qs); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.message }), { itemData: { item: i } }, @@ -326,7 +326,7 @@ export class Supabase implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } }, @@ -402,7 +402,7 @@ export class Supabase implements INodeType { ); returnData.push(...executionData); } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { const executionData = this.helpers.constructExecutionMetaData( this.helpers.returnJsonArray({ error: error.description }), { itemData: { item: i } }, diff --git a/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts b/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts index aa41602f8f..4306abb559 100644 --- a/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts +++ b/packages/nodes-base/nodes/Switch/V1/SwitchV1.node.ts @@ -673,7 +673,7 @@ export class SwitchV1 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData[0].push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts b/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts index f9bad8aeb9..bd20956874 100644 --- a/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts +++ b/packages/nodes-base/nodes/Switch/V2/SwitchV2.node.ts @@ -699,7 +699,7 @@ export class SwitchV2 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData[0].push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts index 20f02eaa27..0b5b6863d4 100644 --- a/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts +++ b/packages/nodes-base/nodes/Switch/V3/SwitchV3.node.ts @@ -378,7 +378,7 @@ export class SwitchV3 implements INodeType { } } } catch (error) { - if (this.continueOnFail()) { + if (this.continueOnFail(error)) { returnData[0].push({ json: { error: error.message } }); continue; } diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts index 3b5a5b3210..c57f20f530 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts @@ -42,7 +42,7 @@ export async function router(this: IExecuteFunctions): Promise = Functions export type ContextType = 'flow' | 'node'; type BaseExecutionFunctions = FunctionsBaseWithRequiredKeys<'getMode'> & { - continueOnFail(): boolean; + continueOnFail(error?: Error): boolean; evaluateExpression(expression: string, itemIndex: number): NodeParameterValueType; getContext(type: ContextType): IContextObject; getExecuteData(): IExecuteData; diff --git a/packages/workflow/src/errors/node-operation.error.ts b/packages/workflow/src/errors/node-operation.error.ts index 9fda163ba0..b5fb2c518e 100644 --- a/packages/workflow/src/errors/node-operation.error.ts +++ b/packages/workflow/src/errors/node-operation.error.ts @@ -1,6 +1,8 @@ import type { INode, JsonObject } from '@/Interfaces'; import type { NodeOperationErrorOptions } from './node-api.error'; import { NodeError } from './abstract/node.error'; +import { ApplicationError } from './application.error'; +import { OBFUSCATED_ERROR_MESSAGE } from '../Constants'; /** * Class for instantiating an operational error, e.g. an invalid credentials error. @@ -16,8 +18,14 @@ export class NodeOperationError extends NodeError { if (error instanceof NodeOperationError) { return error; } + + let obfuscateErrorMessage = false; + if (typeof error === 'string') { error = new Error(error); + } else if (!(error instanceof ApplicationError)) { + // this error was no processed by n8n, obfuscate error message + obfuscateErrorMessage = true; } super(node, error); @@ -26,6 +34,7 @@ export class NodeOperationError extends NodeError { error.messages.forEach((message) => this.addToMessages(message)); } + if (obfuscateErrorMessage) this.message = OBFUSCATED_ERROR_MESSAGE; if (options.message) this.message = options.message; if (options.level) this.level = options.level; if (options.functionality) this.functionality = options.functionality;