Catch workflowExecuteAfter hook (#1189)

This commit is contained in:
Ben Hesseldieck 2020-11-19 10:14:43 +01:00 committed by GitHub
parent 8aa50df457
commit 130f944398
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -761,7 +761,9 @@ export class WorkflowExecute {
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;
});

View file

@ -28,8 +28,6 @@ export class WorkflowHooks {
async executeHookFunctions(hookName: string, parameters: any[]) { // tslint:disable-line:no-any
if (this.hookFunctions[hookName] !== undefined && Array.isArray(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);
}
}