mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
🐛 Fix "unknown", never-end workflow and not displaying error message (#1978)
* Added try catch blocks to avoid endlessly running workflows * Added handling for subworkflows * ⚡ Fix one cause of "unkown" status of worklows with "main" mode * ⚡ Fix one cause of "unkown" status of worklows with "own" mode * ⚡ Fix one cause of "unkown" status of worklows with "queue" mode * Saving database recovery * 🐛 Fix issue that errors did not get saved correctly and also not displayed * ⚡ Save workflow timeout correctly as error * Adding error capture to queued jobs * ⚡ Mark canceled executions as not finished consistently across all modes Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
@@ -213,33 +213,16 @@ export const pushConnection = mixins(
|
||||
|
||||
const runDataExecuted = pushData.data;
|
||||
|
||||
let runDataExecutedErrorMessage;
|
||||
const runDataExecutedErrorMessage = this.$getExecutionError(runDataExecuted.data.resultData.error);
|
||||
|
||||
// @ts-ignore
|
||||
const workflow = this.getWorkflow();
|
||||
if (runDataExecuted.finished !== true) {
|
||||
// There was a problem with executing the workflow
|
||||
let errorMessage = 'There was a problem executing the workflow!';
|
||||
|
||||
if (runDataExecuted.data.resultData.error && runDataExecuted.data.resultData.error.message) {
|
||||
let nodeName: string | undefined;
|
||||
if (runDataExecuted.data.resultData.error.node) {
|
||||
nodeName = typeof runDataExecuted.data.resultData.error.node === 'string'
|
||||
? runDataExecuted.data.resultData.error.node
|
||||
: runDataExecuted.data.resultData.error.node.name;
|
||||
}
|
||||
|
||||
const receivedError = nodeName
|
||||
? `${nodeName}: ${runDataExecuted.data.resultData.error.message}`
|
||||
: runDataExecuted.data.resultData.error.message;
|
||||
errorMessage = `There was a problem executing the workflow:<br /><strong>"${receivedError}"</strong>`;
|
||||
}
|
||||
|
||||
runDataExecutedErrorMessage = errorMessage;
|
||||
|
||||
this.$titleSet(workflow.name as string, 'ERROR');
|
||||
|
||||
this.$showMessage({
|
||||
title: 'Problem executing workflow',
|
||||
message: errorMessage,
|
||||
message: runDataExecutedErrorMessage,
|
||||
type: 'error',
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user