mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(editor): Prevent workflow execution list infinite no network error (#5230)
fix(editor): Prevent workflow execution list create infinite no network error messages
This commit is contained in:
@@ -54,7 +54,7 @@ import { Route } from 'vue-router';
|
||||
import { executionHelpers } from '@/mixins/executionsHelpers';
|
||||
import { range as _range } from 'lodash';
|
||||
import { debounceHelper } from '@/mixins/debounce';
|
||||
import { getNodeViewTab } from '@/utils';
|
||||
import { getNodeViewTab, NO_NETWORK_ERROR_CODE } from '@/utils';
|
||||
import { workflowHelpers } from '@/mixins/workflowHelpers';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useWorkflowsStore } from '@/stores/workflows';
|
||||
@@ -372,8 +372,9 @@ export default mixins(
|
||||
if (updatedActiveExecution !== null) {
|
||||
this.workflowsStore.activeWorkflowExecution = updatedActiveExecution;
|
||||
} else {
|
||||
const activeNotInTheList =
|
||||
existingExecutions.find((ex) => ex.id === this.activeExecution.id) === undefined;
|
||||
const activeNotInTheList = !existingExecutions.some(
|
||||
(ex) => ex.id === this.activeExecution?.id,
|
||||
);
|
||||
if (activeNotInTheList && this.executions.length > 0) {
|
||||
this.$router
|
||||
.push({
|
||||
@@ -394,7 +395,22 @@ export default mixins(
|
||||
try {
|
||||
return await this.workflowsStore.loadCurrentWorkflowExecutions(this.filter);
|
||||
} catch (error) {
|
||||
this.$showError(error, this.$locale.baseText('executionsList.showError.refreshData.title'));
|
||||
if (error.errorCode === NO_NETWORK_ERROR_CODE) {
|
||||
this.$showMessage(
|
||||
{
|
||||
title: this.$locale.baseText('executionsList.showError.refreshData.title'),
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
duration: 3500,
|
||||
},
|
||||
false,
|
||||
);
|
||||
} else {
|
||||
this.$showError(
|
||||
error,
|
||||
this.$locale.baseText('executionsList.showError.refreshData.title'),
|
||||
);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user