mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
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
This commit is contained in:
parent
b377390855
commit
0ad501ec4b
@ -94,7 +94,7 @@ export default class NotificationsService extends Service {
|
|||||||
showAlert(message, options = {}) {
|
showAlert(message, options = {}) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
if (!options.isApiError) {
|
if (!options.isApiError && (!options.type || options.type === 'error')) {
|
||||||
if (this.config.get('sentry_dsn')) {
|
if (this.config.get('sentry_dsn')) {
|
||||||
// message could be a htmlSafe object rather than a string
|
// message could be a htmlSafe object rather than a string
|
||||||
const displayedMessage = message.string || message;
|
const displayedMessage = message.string || message;
|
||||||
|
Loading…
Reference in New Issue
Block a user