Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ghost/core/core/shared/sentry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const config = require('./config');
const SentryKnexTracingIntegration = require('./SentryKnexTracingIntegration');
const sentryConfig = config.get('sentry');
const errors = require('@tryghost/errors');
let _errors;

/**
* @param {import('@sentry/node').Event} event
Expand All @@ -10,6 +10,7 @@ const errors = require('@tryghost/errors');
*/
const beforeSend = function (event, hint) {
try {
const errors = _errors || (_errors = require('@tryghost/errors'));
const exception = hint.originalException;
const code = exception?.code ?? null;
const context = exception?.context ?? null;
Expand Down