From e740cef863a5a15fa8cda0e290745f1d32783b10 Mon Sep 17 00:00:00 2001 From: Sag Date: Mon, 22 Jul 2024 09:55:37 +0200 Subject: [PATCH] Fixed regex to ignore AbortError in Sentry (#20639) fixes https://linear.app/tryghost/issue/SLO-175 --- ghost/admin/app/routes/application.js | 2 +- ghost/admin/app/utils/sentry.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ghost/admin/app/routes/application.js b/ghost/admin/app/routes/application.js index 5eb27060f1..24a5f7ad57 100644 --- a/ghost/admin/app/routes/application.js +++ b/ghost/admin/app/routes/application.js @@ -186,7 +186,7 @@ export default Route.extend(ShortcutsRoute, { beforeSend, ignoreErrors: [ // Browser autoplay policies (this regex covers a few) - /The play() request was interrupted/, + /^The play\(\) request was interrupted.*/, /The request is not allowed by the user agent or the platform in the current context/, // Network errors that we don't control diff --git a/ghost/admin/app/utils/sentry.js b/ghost/admin/app/utils/sentry.js index 1056046b2f..4677f68fa2 100644 --- a/ghost/admin/app/utils/sentry.js +++ b/ghost/admin/app/utils/sentry.js @@ -34,7 +34,7 @@ export function beforeSend(event, hint) { delete event.tags.ajax_url; } - // Do not report poshog-js errors to Sentry + // Do not report posthog-js errors to Sentry if (hint && hint.originalException && hint.originalException.stack) { if (hint.originalException.stack.includes('/posthog-js/')) { return null;