diff --git a/cypress/e2e/30-langchain.cy.ts b/cypress/e2e/30-langchain.cy.ts index b6f1b56eed5f0..5d7001d79ae5c 100644 --- a/cypress/e2e/30-langchain.cy.ts +++ b/cypress/e2e/30-langchain.cy.ts @@ -47,6 +47,7 @@ import { } from '../composables/workflow'; import { NDV, WorkflowPage } from '../pages'; import { createMockNodeExecutionData, runMockWorkflowExecution } from '../utils'; +import { ExecutionError } from 'n8n-workflow'; describe('Langchain Integration', () => { beforeEach(() => { diff --git a/packages/editor-ui/src/components/OutputPanel.vue b/packages/editor-ui/src/components/OutputPanel.vue index 4a57eaf6e0da3..c4a69854767ce 100644 --- a/packages/editor-ui/src/components/OutputPanel.vue +++ b/packages/editor-ui/src/components/OutputPanel.vue @@ -120,16 +120,17 @@ const hasAiMetadata = computed(() => { return false; }); -const hasError = computed( - () => +const hasError = computed(() => + Boolean( workflowRunData.value && - node.value && - (workflowRunData.value[node.value.name]?.[props.runIndex]?.error as NodeError), + node.value && + workflowRunData.value[node.value.name]?.[props.runIndex]?.error, + ), ); // Determine the initial output mode to logs if the node has an error and the logs are available const defaultOutputMode = computed(() => { - return Boolean(hasError) && hasAiMetadata.value ? OUTPUT_TYPE.LOGS : OUTPUT_TYPE.REGULAR; + return hasError.value && hasAiMetadata.value ? OUTPUT_TYPE.LOGS : OUTPUT_TYPE.REGULAR; }); const isNodeRunning = computed(() => { @@ -218,7 +219,7 @@ const canPinData = computed(() => { }); const allToolsWereUnusedNotice = computed(() => { - if (!node.value || runsCount.value === 0 || hasError) return undefined; + if (!node.value || runsCount.value === 0 || hasError.value) return undefined; // With pinned data there's no clear correct answer for whether // we should use historic or current parents, so we don't show the notice,