Skip to content

Commit 586e480

Browse files
authored
send to sentry if the update failed (#104)
1 parent cd9accc commit 586e480

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

packages/main/src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ function updateAppAndQuit() {
7777
log.info('[Main Window][AutoUpdater] Update available');
7878
});
7979

80+
updater.autoUpdater.on('update-cancelled', info => {
81+
Sentry.captureMessage('Auto-update was cancelled', {
82+
level: 'info',
83+
extra: {
84+
updateInfo: info,
85+
},
86+
});
87+
});
88+
8089
updater.autoUpdater.on('update-not-available', _info => {
8190
log.info('[Main Window][AutoUpdater] Update not available');
8291
app.quit();
@@ -94,6 +103,9 @@ function updateAppAndQuit() {
94103

95104
updater.autoUpdater.on('error', err => {
96105
log.error('[Main Window][AutoUpdater] Error in auto-updater', err);
106+
107+
Sentry.captureException(err);
108+
97109
app.quit();
98110
});
99111

0 commit comments

Comments
 (0)