mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(core): Handle missing resultData in runData (#7523)
This commit is contained in:
parent
d8ec6eac40
commit
1055bd3762
|
@ -73,8 +73,8 @@ export class WorkflowRunner {
|
|||
/**
|
||||
* The process did send a hook message so execute the appropriate hook
|
||||
*/
|
||||
processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
|
||||
void workflowHooks.executeHookFunctions(hookData.hook, hookData.parameters);
|
||||
async processHookMessage(workflowHooks: WorkflowHooks, hookData: IProcessMessageDataHook) {
|
||||
await workflowHooks.executeHookFunctions(hookData.hook, hookData.parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -777,7 +777,7 @@ export class WorkflowRunner {
|
|||
workflowHooks,
|
||||
);
|
||||
} 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') {
|
||||
// Execution timed out and its process has been terminated
|
||||
const timeoutError = new WorkflowOperationError('Workflow execution timed out!');
|
||||
|
|
|
@ -11,7 +11,7 @@ export function determineFinalExecutionStatus(runData: IRun): ExecutionStatus {
|
|||
const workflowHasCrashed = runData.status === 'crashed';
|
||||
const workflowWasCanceled = runData.status === 'canceled';
|
||||
const workflowDidSucceed =
|
||||
!runData.data.resultData.error && !workflowHasCrashed && !workflowWasCanceled;
|
||||
!runData.data.resultData?.error && !workflowHasCrashed && !workflowWasCanceled;
|
||||
let workflowStatusFinal: ExecutionStatus = workflowDidSucceed ? 'success' : 'failed';
|
||||
if (workflowHasCrashed) workflowStatusFinal = 'crashed';
|
||||
if (workflowWasCanceled) workflowStatusFinal = 'canceled';
|
||||
|
|
Loading…
Reference in a new issue