🐛 Swallow telemetry error and only log in warn and debug mode (#2858)

* catch nodegraph errors

* use loglevel config for telemetry

* Use getByNameAndVersion instead of getByName

* remove any usage of nodeTypes.getByName method

* deprecate getByName method
This commit is contained in:
Ahsan Virani
2022-02-24 17:15:30 +01:00
committed by GitHub
parent 2b9f3aab1b
commit 8fc1095d1e
8 changed files with 58 additions and 74 deletions

View File

@@ -23,6 +23,7 @@ import {
INodeType,
INodeTypeData,
INodeTypes,
INodeVersionedType,
IRunExecutionData,
ITaskDataConnections,
IWorkflowBase,
@@ -614,7 +615,7 @@ class NodeTypesClass implements INodeTypes {
return Object.values(this.nodeTypes).map((data) => NodeHelpers.getVersionedNodeType(data.type));
}
getByName(nodeType: string): INodeType {
getByName(nodeType: string): INodeType | INodeVersionedType | undefined {
return this.getByNameAndVersion(nodeType);
}

View File

@@ -618,7 +618,7 @@ describe('RoutingNode', () => {
const runExecutionData: IRunExecutionData = { resultData: { runData: {} } };
const additionalData = Helpers.WorkflowExecuteAdditionalData();
const path = '';
const nodeType = nodeTypes.getByName(node.type);
const nodeType = nodeTypes.getByNameAndVersion(node.type);
const workflowData = {
nodes: [node],
@@ -1596,7 +1596,7 @@ describe('RoutingNode', () => {
const connectionInputData: INodeExecutionData[] = [];
const runExecutionData: IRunExecutionData = { resultData: { runData: {} } };
const additionalData = Helpers.WorkflowExecuteAdditionalData();
const nodeType = nodeTypes.getByName(baseNode.type);
const nodeType = nodeTypes.getByNameAndVersion(baseNode.type);
const inputData: ITaskDataConnections = {
main: [