From 0ad501ec4b7c65d0afe8720985f93c4a96069527 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Wed, 7 Sep 2022 13:42:28 +0100 Subject: [PATCH] Updated showAlert to send only errors to sentry refs: https://github.com/TryGhost/Team/issues/1121 - Reviewing the list of errors in sentry, some of the most common ones are: - success messages like "Password changed" - info messages like "Please check your email for instructions." - warnings like "You need to sign out to register as a new user." - None of these are errors, so they shouldn't appear in sentry --- ghost/admin/app/services/notifications.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ghost/admin/app/services/notifications.js b/ghost/admin/app/services/notifications.js index d08b0480d2..06f1ba1e6c 100644 --- a/ghost/admin/app/services/notifications.js +++ b/ghost/admin/app/services/notifications.js @@ -94,7 +94,7 @@ export default class NotificationsService extends Service { showAlert(message, options = {}) { options = options || {}; - if (!options.isApiError) { + if (!options.isApiError && (!options.type || options.type === 'error')) { if (this.config.get('sentry_dsn')) { // message could be a htmlSafe object rather than a string const displayedMessage = message.string || message;