mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
fix(editor): Show error toast for failed executions (#15388)
This commit is contained in:
committed by
GitHub
parent
954b66218f
commit
e68149bbc7
@@ -24,6 +24,7 @@ import { type PinDataSource, usePinnedData } from '@/composables/usePinnedData';
|
||||
import { useTelemetry } from '@/composables/useTelemetry';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useWorkflowHelpers } from '@/composables/useWorkflowHelpers';
|
||||
import { getExecutionErrorToastConfiguration } from '@/utils/executionUtils';
|
||||
import {
|
||||
EnterpriseEditionFeature,
|
||||
FORM_TRIGGER_NODE_TYPE,
|
||||
@@ -2009,6 +2010,14 @@ export function useCanvasOperations({ router }: { router: ReturnType<typeof useR
|
||||
throw new Error(`Execution with id "${executionId}" could not be found!`);
|
||||
}
|
||||
|
||||
if (data.status === 'error' && data.data?.resultData.error) {
|
||||
const { title, message } = getExecutionErrorToastConfiguration({
|
||||
error: data.data.resultData.error,
|
||||
lastNodeExecuted: data.data.resultData.lastNodeExecuted,
|
||||
});
|
||||
toast.showMessage({ title, message, type: 'error', duration: 0 });
|
||||
}
|
||||
|
||||
initializeWorkspace(data.workflowData);
|
||||
|
||||
workflowsStore.setWorkflowExecutionData(data);
|
||||
|
||||
Reference in New Issue
Block a user