mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Implement continueOnFail
This commit is contained in:
parent
6a90c70a52
commit
b8df1f2c2c
|
@ -8,6 +8,7 @@ import {
|
||||||
INodeExecutionData,
|
INodeExecutionData,
|
||||||
INodeType,
|
INodeType,
|
||||||
INodeTypeDescription,
|
INodeTypeDescription,
|
||||||
|
NodeApiError,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
|
|
||||||
import {
|
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/update-specific-record.html
|
||||||
// https://www.zoho.com/crm/developer/docs/api/delete-specific-record.html
|
// https://www.zoho.com/crm/developer/docs/api/delete-specific-record.html
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
if (resource === 'account') {
|
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)
|
Array.isArray(responseData)
|
||||||
? returnData.push(...responseData)
|
? returnData.push(...responseData)
|
||||||
: returnData.push(responseData);
|
: returnData.push(responseData);
|
||||||
|
|
Loading…
Reference in a new issue