diff --git a/gui/electron/main/sentry.ts b/gui/electron/main/sentry.ts index 2b7c39669..971ed2d37 100644 --- a/gui/electron/main/sentry.ts +++ b/gui/electron/main/sentry.ts @@ -185,7 +185,13 @@ export function captureServerExit( } export function sendCrashReport(kind: CrashReportKind) { - if (!Sentry.isInitialized()) return false; + if (!Sentry.isInitialized()) { + logger.warn( + { kind }, + 'Tried to send Sentry crash report before Sentry has initialised' + ); + return false; + } const failure = lastServerFailure; Sentry.withScope((scope) => { scope.setTag(USER_REQUESTED_TAG, 'true');