mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix: Make sure errors are transferred correctly from js task runner (no-changelog) (#11214)
This commit is contained in:
@@ -21,6 +21,7 @@ import type { NodeOperationError } from './errors/node-operation.error';
|
||||
import type { WorkflowActivationError } from './errors/workflow-activation.error';
|
||||
import type { WorkflowOperationError } from './errors/workflow-operation.error';
|
||||
import type { ExecutionStatus } from './ExecutionStatus';
|
||||
import type { Result } from './result';
|
||||
import type { Workflow } from './Workflow';
|
||||
import type { EnvProviderState } from './WorkflowDataProxyEnvProvider';
|
||||
import type { WorkflowHooks } from './WorkflowHooks';
|
||||
@@ -997,7 +998,11 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||
|
||||
getParentCallbackManager(): CallbackManager | undefined;
|
||||
|
||||
startJob<T = unknown>(jobType: string, settings: unknown, itemIndex: number): Promise<T>;
|
||||
startJob<T = unknown, E = unknown>(
|
||||
jobType: string,
|
||||
settings: unknown,
|
||||
itemIndex: number,
|
||||
): Promise<Result<T, E>>;
|
||||
};
|
||||
|
||||
export interface IExecuteSingleFunctions extends BaseExecutionFunctions {
|
||||
@@ -2285,7 +2290,7 @@ export interface IWorkflowExecuteAdditionalData {
|
||||
secretsHelpers: SecretsHelpersBase;
|
||||
logAiEvent: (eventName: AiEvent, payload: AiEventPayload) => void;
|
||||
parentCallbackManager?: CallbackManager;
|
||||
startAgentJob<T>(
|
||||
startAgentJob<T, E = unknown>(
|
||||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
jobType: string,
|
||||
settings: unknown,
|
||||
@@ -2305,7 +2310,7 @@ export interface IWorkflowExecuteAdditionalData {
|
||||
defaultReturnRunIndex?: number,
|
||||
selfData?: IDataObject,
|
||||
contextNodeName?: string,
|
||||
): Promise<T>;
|
||||
): Promise<Result<T, E>>;
|
||||
}
|
||||
|
||||
export type WorkflowExecuteMode =
|
||||
@@ -2752,8 +2757,6 @@ export type BannerName =
|
||||
|
||||
export type Functionality = 'regular' | 'configuration-node' | 'pairedItem';
|
||||
|
||||
export type Result<T, E> = { ok: true; result: T } | { ok: false; error: E };
|
||||
|
||||
export type CallbackManager = CallbackManagerLC;
|
||||
|
||||
export type IPersonalizationSurveyAnswersV4 = {
|
||||
|
||||
Reference in New Issue
Block a user