mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
feat: Track node errors on PostHog (#8774)
Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
@@ -598,6 +598,7 @@ import { useToast } from '@/composables/useToast';
|
|||||||
import { isEqual, isObject } from 'lodash-es';
|
import { isEqual, isObject } from 'lodash-es';
|
||||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||||
|
import { useRootStore } from '@/stores/n8nRoot.store';
|
||||||
import RunDataPinButton from '@/components/RunDataPinButton.vue';
|
import RunDataPinButton from '@/components/RunDataPinButton.vue';
|
||||||
|
|
||||||
const RunDataTable = defineAsyncComponent(
|
const RunDataTable = defineAsyncComponent(
|
||||||
@@ -738,12 +739,38 @@ export default defineComponent({
|
|||||||
this.setDisplayMode();
|
this.setDisplayMode();
|
||||||
this.activatePane();
|
this.activatePane();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.hasRunError) {
|
||||||
|
const error = this.workflowRunData?.[this.node.name]?.[this.runIndex]?.error;
|
||||||
|
const errorsToTrack = ['unknown error'];
|
||||||
|
|
||||||
|
if (error && errorsToTrack.some((e) => error.message.toLowerCase().includes(e))) {
|
||||||
|
this.$telemetry.track(
|
||||||
|
`User encountered an error: "${error.message}"`,
|
||||||
|
{
|
||||||
|
node: this.node.type,
|
||||||
|
errorMessage: error.message,
|
||||||
|
nodeVersion: this.node.typeVersion,
|
||||||
|
n8nVersion: this.rootStore.versionCli,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
withPostHog: true,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.hidePinDataDiscoveryTooltip();
|
this.hidePinDataDiscoveryTooltip();
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapStores(useNodeTypesStore, useNDVStore, useWorkflowsStore, useSourceControlStore),
|
...mapStores(
|
||||||
|
useNodeTypesStore,
|
||||||
|
useNDVStore,
|
||||||
|
useWorkflowsStore,
|
||||||
|
useSourceControlStore,
|
||||||
|
useRootStore,
|
||||||
|
),
|
||||||
isReadOnlyRoute() {
|
isReadOnlyRoute() {
|
||||||
return this.$route?.meta?.readOnlyCanvas === true;
|
return this.$route?.meta?.readOnlyCanvas === true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user