mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
fix(Postgres Trigger Node): closeFunction errors should not prevent a workflow from being deactivated (#8738)
This commit is contained in:
committed by
GitHub
parent
15490ad1d4
commit
7012577fce
@@ -15,8 +15,10 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
ApplicationError,
|
||||
ErrorReporterProxy as ErrorReporter,
|
||||
LoggerProxy as Logger,
|
||||
toCronExpression,
|
||||
TriggerCloseError,
|
||||
WorkflowActivationError,
|
||||
WorkflowDeactivationError,
|
||||
} from 'n8n-workflow';
|
||||
@@ -238,6 +240,14 @@ export class ActiveWorkflows {
|
||||
try {
|
||||
await response.closeFunction();
|
||||
} catch (e) {
|
||||
if (e instanceof TriggerCloseError) {
|
||||
Logger.error(
|
||||
`There was a problem calling "closeFunction" on "${e.node.name}" in workflow "${workflowId}"`,
|
||||
);
|
||||
ErrorReporter.error(e, { extra: { target, workflowId } });
|
||||
return;
|
||||
}
|
||||
|
||||
const error = e instanceof Error ? e : new Error(`${e}`);
|
||||
|
||||
throw new WorkflowDeactivationError(
|
||||
|
||||
Reference in New Issue
Block a user