diff --git a/packages/cli/src/events/WorkflowStatistics.ts b/packages/cli/src/events/WorkflowStatistics.ts index 02b0f441d8..92853a43a2 100644 --- a/packages/cli/src/events/WorkflowStatistics.ts +++ b/packages/cli/src/events/WorkflowStatistics.ts @@ -52,7 +52,6 @@ export async function workflowExecutionCompleted( // Send the metrics await InternalHooksManager.getInstance().onFirstProductionWorkflowSuccess(metrics); } catch (error) { - console.error(error); // Do we just assume it's a conflict error? If there is any other sort of error in the DB it should trigger here too await Db.collections.WorkflowStatistics.update( { workflowId, name }, diff --git a/packages/cli/test/unit/Events.test.ts b/packages/cli/test/unit/Events.test.ts index 5ac9129cb4..29e2baf132 100644 --- a/packages/cli/test/unit/Events.test.ts +++ b/packages/cli/test/unit/Events.test.ts @@ -132,7 +132,6 @@ describe('Events', () => { test('should not send metrics for updated entries', async () => { // Call the function with the id that causes insert to fail, ensure update is called *and* metrics aren't sent - const mockedError = jest.spyOn(console, 'error'); const workflow = { id: '-1', name: '', @@ -148,9 +147,7 @@ describe('Events', () => { mode: 'internal' as WorkflowExecuteMode, startedAt: new Date(), }; - mockedError.mockClear(); await workflowExecutionCompleted(workflow, runData); - expect(mockedError).toBeCalled(); expect(mockedFirstProductionWorkflowSuccess).toBeCalledTimes(0); }); });