mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 04:04:06 -08:00
fix(core): Deduplicate sentry events using error stacktraces instead (no-changelog) (#10590)
This commit is contained in:
parent
95a9cd2c73
commit
3b43ff69a7
|
@ -82,9 +82,11 @@ export const initErrorHandling = async () => {
|
|||
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;
|
||||
seenErrors.add(eventHash);
|
||||
}
|
||||
|
||||
return event;
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue