mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
move catch before finally
This commit is contained in:
parent
5ecfae6320
commit
912c94e541
|
@ -107,13 +107,13 @@ export class ActiveExecutions {
|
||||||
|
|
||||||
// Automatically remove execution once the postExecutePromise settles
|
// Automatically remove execution once the postExecutePromise settles
|
||||||
void postExecutePromise.promise
|
void postExecutePromise.promise
|
||||||
|
.catch((error) => {
|
||||||
|
// rethrow the error unless it's ExecutionCancelledError
|
||||||
|
if (!(error instanceof ExecutionCancelledError)) throw error;
|
||||||
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
this.concurrencyControl.release({ mode: executionData.executionMode });
|
this.concurrencyControl.release({ mode: executionData.executionMode });
|
||||||
delete this.activeExecutions[executionId];
|
delete this.activeExecutions[executionId];
|
||||||
})
|
|
||||||
// Do not throw ExecutionCancelledError
|
|
||||||
.catch((error) => {
|
|
||||||
if (!(error instanceof ExecutionCancelledError)) throw error;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return executionId;
|
return executionId;
|
||||||
|
|
Loading…
Reference in a new issue