mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(core): Handle missing resultData in runData (#7523)
This commit is contained in:
committed by
GitHub
parent
d8ec6eac40
commit
1055bd3762
@@ -73,8 +73,8 @@ export class WorkflowRunner {
|
|||||||
/**
|
/**
|
||||||
* The process did send a hook message so execute the appropriate hook
|
* The process did send a hook message so execute the appropriate hook
|
||||||
*/
|
*/
|
||||||
processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
|
async processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
|
||||||
void workflowHooks.executeHookFunctions(hookData.hook, hookData.parameters);
|
await workflowHooks.executeHookFunctions(hookData.hook, hookData.parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -777,7 +777,7 @@ export class WorkflowRunner {
|
|||||||
workflowHooks,
|
workflowHooks,
|
||||||
);
|
);
|
||||||
} else if (message.type === 'processHook') {
|
} else if (message.type === 'processHook') {
|
||||||
this.processHookMessage(workflowHooks, message.data as IProcessMessageDataHook);
|
await this.processHookMessage(workflowHooks, message.data as IProcessMessageDataHook);
|
||||||
} else if (message.type === 'timeout') {
|
} else if (message.type === 'timeout') {
|
||||||
// Execution timed out and its process has been terminated
|
// Execution timed out and its process has been terminated
|
||||||
const timeoutError = new WorkflowOperationError('Workflow execution timed out!');
|
const timeoutError = new WorkflowOperationError('Workflow execution timed out!');
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export function determineFinalExecutionStatus(runData: IRun): ExecutionStatus {
|
|||||||
const workflowHasCrashed = runData.status === 'crashed';
|
const workflowHasCrashed = runData.status === 'crashed';
|
||||||
const workflowWasCanceled = runData.status === 'canceled';
|
const workflowWasCanceled = runData.status === 'canceled';
|
||||||
const workflowDidSucceed =
|
const workflowDidSucceed =
|
||||||
!runData.data.resultData.error && !workflowHasCrashed && !workflowWasCanceled;
|
!runData.data.resultData?.error && !workflowHasCrashed && !workflowWasCanceled;
|
||||||
let workflowStatusFinal: ExecutionStatus = workflowDidSucceed ? 'success' : 'failed';
|
let workflowStatusFinal: ExecutionStatus = workflowDidSucceed ? 'success' : 'failed';
|
||||||
if (workflowHasCrashed) workflowStatusFinal = 'crashed';
|
if (workflowHasCrashed) workflowStatusFinal = 'crashed';
|
||||||
if (workflowWasCanceled) workflowStatusFinal = 'canceled';
|
if (workflowWasCanceled) workflowStatusFinal = 'canceled';
|
||||||
|
|||||||
Reference in New Issue
Block a user