mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +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
@@ -1,7 +1,7 @@
|
||||
import callsites from 'callsites';
|
||||
import type { Event } from '@sentry/node';
|
||||
|
||||
type Level = 'warning' | 'error' | 'fatal' | 'info';
|
||||
export type Level = 'warning' | 'error' | 'fatal' | 'info';
|
||||
|
||||
export type ReportingOptions = {
|
||||
level?: Level;
|
||||
|
||||
@@ -10,6 +10,7 @@ export { WorkflowDeactivationError } from './workflow-deactivation.error';
|
||||
export { WorkflowOperationError } from './workflow-operation.error';
|
||||
export { SubworkflowOperationError } from './subworkflow-operation.error';
|
||||
export { CliWorkflowOperationError } from './cli-subworkflow-operation.error';
|
||||
export { TriggerCloseError } from './trigger-close.error';
|
||||
|
||||
export { NodeError } from './abstract/node.error';
|
||||
export { ExecutionBaseError } from './abstract/execution-base.error';
|
||||
|
||||
16
packages/workflow/src/errors/trigger-close.error.ts
Normal file
16
packages/workflow/src/errors/trigger-close.error.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { INode } from '../Interfaces';
|
||||
import { ApplicationError, type Level } from './application.error';
|
||||
|
||||
interface TriggerCloseErrorOptions extends ErrorOptions {
|
||||
level: Level;
|
||||
}
|
||||
|
||||
export class TriggerCloseError extends ApplicationError {
|
||||
constructor(
|
||||
readonly node: INode,
|
||||
{ cause, level }: TriggerCloseErrorOptions,
|
||||
) {
|
||||
super('Trigger Close Failed', { cause, extra: { nodeName: node.name } });
|
||||
this.level = level;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user