show execution not forund message

This commit is contained in:
Michael Kret 2025-03-04 06:10:13 +02:00
parent 39704860ef
commit ca98c30f6b
2 changed files with 14 additions and 5 deletions

View file

@ -79,9 +79,9 @@ export class WaitingForms extends WaitingWebhooks {
const execution = await this.getExecution(executionId);
if (execution && suffix === WAITING_FORMS_EXECUTION_STATUS) {
let status: string = execution?.status;
const { node } = execution.data.executionData?.nodeExecutionStack[0] ?? {};
if (suffix === WAITING_FORMS_EXECUTION_STATUS) {
let status: string = execution?.status ?? 'null';
const { node } = execution?.data.executionData?.nodeExecutionStack[0] ?? {};
if (node && status === 'waiting') {
if (node.type === FORM_NODE_TYPE) {
@ -91,7 +91,7 @@ export class WaitingForms extends WaitingWebhooks {
status = 'form-waiting';
}
}
res.send(status ?? null);
res.send(status);
return { noWebhookResponse: true };
}

View file

@ -774,7 +774,6 @@
let formWaitingUrl;
const checkExecutionStatus = async () => {
try {
const response = await fetch(`${formWaitingUrl ?? window.location.href}/n8n-execution-status`);
const text = (await response.text()).trim();
@ -791,6 +790,16 @@
return;
}
if (text === "null") {
form.style.display = 'none';
document.querySelector('#submitted-form').style.display = 'block';
document.querySelector('#submitted-header').textContent = 'Could not get execution status';
document.querySelector('#submitted-content').textContent =
'Make sure "Save successful production executions" is enabled in your workflow settings';
clearTimeout(timeoutId);
return;
}
if(["canceled", "crashed", "error" ].includes(text)) {
form.style.display = 'none';
document.querySelector('#submitted-form').style.display = 'block';