Implement continueOnFail

This commit is contained in:
Iván Ovejero 2021-05-10 14:28:10 +02:00
parent 6a90c70a52
commit b8df1f2c2c

View file

@ -8,6 +8,7 @@ import {
INodeExecutionData,
INodeType,
INodeTypeDescription,
NodeApiError,
} from 'n8n-workflow';
import {
@ -198,6 +199,8 @@ export class ZohoCrm implements INodeType {
// https://www.zoho.com/crm/developer/docs/api/update-specific-record.html
// https://www.zoho.com/crm/developer/docs/api/delete-specific-record.html
try {
if (resource === 'account') {
// **********************************************************************
@ -967,6 +970,15 @@ export class ZohoCrm implements INodeType {
}
} catch (error) {
if (this.continueOnFail()) {
returnData.push({ error: error.message });
continue;
}
throw error;
}
Array.isArray(responseData)
? returnData.push(...responseData)
: returnData.push(responseData);