mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
⚡ Catch workflowExecuteAfter hook (#1189)
This commit is contained in:
@@ -761,7 +761,9 @@ export class WorkflowExecute {
|
|||||||
newStaticData = workflow.staticData;
|
newStaticData = workflow.staticData;
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.executeHook('workflowExecuteAfter', [fullRunData, newStaticData]);
|
await this.executeHook('workflowExecuteAfter', [fullRunData, newStaticData]).catch(error => {
|
||||||
|
console.error('There was a problem running hook "workflowExecuteAfter"', error);
|
||||||
|
});
|
||||||
|
|
||||||
return fullRunData;
|
return fullRunData;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ export class WorkflowHooks {
|
|||||||
async executeHookFunctions(hookName: string, parameters: any[]) { // tslint:disable-line:no-any
|
async executeHookFunctions(hookName: string, parameters: any[]) { // tslint:disable-line:no-any
|
||||||
if (this.hookFunctions[hookName] !== undefined && Array.isArray(this.hookFunctions[hookName])) {
|
if (this.hookFunctions[hookName] !== undefined && Array.isArray(this.hookFunctions[hookName])) {
|
||||||
for (const hookFunction of this.hookFunctions[hookName]!) {
|
for (const hookFunction of this.hookFunctions[hookName]!) {
|
||||||
// TODO: As catch got removed we should make sure that we catch errors
|
|
||||||
// where hooks get called
|
|
||||||
await hookFunction.apply(this, parameters);
|
await hookFunction.apply(this, parameters);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user