mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(editor): Expose View Execution links for erroneous sub-executions (#13185)
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
type INodeType,
|
||||
type INodeTypeDescription,
|
||||
NodeOperationError,
|
||||
parseErrorMetadata,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import { promptTypeOptions, textFromPreviousNode } from '@utils/descriptions';
|
||||
@@ -229,7 +230,12 @@ export class ChainRetrievalQa implements INodeType {
|
||||
returnData.push({ json: { response } });
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
returnData.push({ json: { error: error.message }, pairedItem: { item: itemIndex } });
|
||||
const metadata = parseErrorMetadata(error);
|
||||
returnData.push({
|
||||
json: { error: error.message },
|
||||
pairedItem: { item: itemIndex },
|
||||
metadata,
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import {
|
||||
jsonParse,
|
||||
NodeConnectionType,
|
||||
NodeOperationError,
|
||||
parseErrorMetadata,
|
||||
traverseNodeParameters,
|
||||
} from 'n8n-workflow';
|
||||
import { z } from 'zod';
|
||||
@@ -92,7 +93,9 @@ export class WorkflowToolService {
|
||||
} catch (error) {
|
||||
const executionError = error as ExecutionError;
|
||||
const errorResponse = `There was an error: "${executionError.message}"`;
|
||||
void this.context.addOutputData(NodeConnectionType.AiTool, index, executionError);
|
||||
|
||||
const metadata = parseErrorMetadata(error);
|
||||
void this.context.addOutputData(NodeConnectionType.AiTool, index, executionError, metadata);
|
||||
return errorResponse;
|
||||
} finally {
|
||||
// @ts-expect-error this accesses a private member on the actual implementation to fix https://linear.app/n8n/issue/ADO-3186/bug-workflowtool-v2-always-uses-first-row-of-input-data
|
||||
|
||||
Reference in New Issue
Block a user