mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-12-06 08:42:32 -08:00
Log warning if sendCrashReport is called while Sentry is uninitialised
This commit is contained in:
1 file changed
+7
-1
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user