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
16 changes: 9 additions & 7 deletions src/internal-plugins/metrics/lib/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ module.exports = function() {
window.addEventListener('error', function(err) {
debug('error encountered, notify trackers', err);
// Notify user that error occurred
if (!_.includes(err.message, 'MongoError')) {
Notifier.notify({
'icon': ICON_PATH,
'message': 'Unexpected error occurred: ' + err.message,
'title': 'MongoDB Compass Exception',
'wait': true
});
if (process.env.NODE_ENV !== 'production') {
if (!_.includes(err.message, 'MongoError')) {
Notifier.notify({
'icon': ICON_PATH,
'message': 'Unexpected error occurred: ' + err.message,
'title': 'MongoDB Compass Exception',
'wait': true
});
}
}
metrics.error(err);
// hide progress bar when an unknown error occurs.
Expand Down