mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
feat(core): Add optional Error-Output (#7460)
Add an additional optional error output to which all items get sent that could not be processed.  Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/error-connector-for-nodes/3094 https://community.n8n.io/t/error-handling-at-node-level-detect-node-execution-status/26791 --------- Co-authored-by: OlegIvaniv <me@olegivaniv.com>
This commit is contained in:
@@ -1978,21 +1978,25 @@ export default defineComponent({
|
||||
lastSelectedNode.type,
|
||||
lastSelectedNode.typeVersion,
|
||||
);
|
||||
|
||||
if (sourceNodeType) {
|
||||
const offsets = [
|
||||
[-100, 100],
|
||||
[-140, 0, 140],
|
||||
[-240, -100, 100, 240],
|
||||
];
|
||||
|
||||
const sourceNodeOutputs = NodeHelpers.getNodeOutputs(
|
||||
workflow,
|
||||
lastSelectedNode,
|
||||
sourceNodeType,
|
||||
);
|
||||
const sourceNodeOutputTypes = NodeHelpers.getConnectionTypes(sourceNodeOutputs);
|
||||
|
||||
const sourceNodeOutputMainOutputs = sourceNodeOutputTypes.filter(
|
||||
(output) => output === NodeConnectionType.Main,
|
||||
);
|
||||
|
||||
if (sourceNodeOutputMainOutputs.length > 1) {
|
||||
const offset = offsets[sourceNodeOutputMainOutputs.length - 2];
|
||||
const sourceOutputIndex = lastSelectedConnection.__meta
|
||||
@@ -2005,9 +2009,9 @@ export default defineComponent({
|
||||
|
||||
let outputs: Array<ConnectionTypes | INodeOutputConfiguration> = [];
|
||||
try {
|
||||
// It fails when the outputs are an expression. As those node have
|
||||
// It fails when the outputs are an expression. As those nodes have
|
||||
// normally no outputs by default and the only reason we need the
|
||||
// outputs here is to calculate the position it is fine to assume
|
||||
// outputs here is to calculate the position, it is fine to assume
|
||||
// that they have no outputs and are so treated as a regular node
|
||||
// with only "main" outputs.
|
||||
outputs = NodeHelpers.getNodeOutputs(workflow, newNodeData, nodeTypeData);
|
||||
@@ -2571,7 +2575,9 @@ export default defineComponent({
|
||||
);
|
||||
if (sourceInfo.type !== NodeConnectionType.Main) {
|
||||
// Not "main" connections get a different connection style
|
||||
info.connection.setPaintStyle(getConnectorPaintStyleData(info.connection));
|
||||
info.connection.setPaintStyle(
|
||||
getConnectorPaintStyleData(info.connection, info.sourceEndpoint.parameters.category),
|
||||
);
|
||||
endpointArrow?.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user