mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Improved capture of messages to sentry
refs: https://github.com/TryGhost/Team/issues/1121 - use captureMessage instead of captureException in showAlert as showAlert should always have a String not an Error - this should hopefully improve how these things appear in Sentry - moved source to a tag, not context, so we can filter on the source in sentry UI
This commit is contained in:
parent
0ad501ec4b
commit
2cc5c15ca4
@ -103,15 +103,15 @@ export default class NotificationsService extends Service {
|
||||
ghost: {
|
||||
displayed_message: displayedMessage,
|
||||
ghost_error_code: options.ghostErrorCode,
|
||||
full_error: message,
|
||||
source: 'showAlert'
|
||||
full_error: message
|
||||
}
|
||||
};
|
||||
|
||||
Sentry.captureException(displayedMessage, {
|
||||
Sentry.captureMessage(displayedMessage, {
|
||||
contexts,
|
||||
tags: {
|
||||
shown_to_user: true
|
||||
shown_to_user: true,
|
||||
source: 'showAlert'
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -196,12 +196,12 @@ export default class NotificationsService extends Service {
|
||||
ghost: {
|
||||
ghost_error_code: resp.ghostErrorCode,
|
||||
displayed_message: msg,
|
||||
full_error: resp,
|
||||
source: 'showAPIError'
|
||||
full_error: resp
|
||||
}
|
||||
},
|
||||
tags: {
|
||||
shown_to_user: true
|
||||
shown_to_user: true,
|
||||
source: 'showAPIError'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user