mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Deduplicate sentry events using error stacktraces instead (no-changelog) (#10590)
This commit is contained in:
committed by
GitHub
parent
95a9cd2c73
commit
3b43ff69a7
@@ -82,9 +82,11 @@ export const initErrorHandling = async () => {
|
|||||||
if (tags) event.tags = { ...event.tags, ...tags };
|
if (tags) event.tags = { ...event.tags, ...tags };
|
||||||
}
|
}
|
||||||
|
|
||||||
const eventHash = createHash('sha1').update(JSON.stringify(originalException)).digest('base64');
|
if (originalException instanceof Error && originalException.stack) {
|
||||||
|
const eventHash = createHash('sha1').update(originalException.stack).digest('base64');
|
||||||
if (seenErrors.has(eventHash)) return null;
|
if (seenErrors.has(eventHash)) return null;
|
||||||
seenErrors.add(eventHash);
|
seenErrors.add(eventHash);
|
||||||
|
}
|
||||||
|
|
||||||
return event;
|
return event;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user