A sentry capture

This commit is contained in:
a6a2f5842 2025-12-02 18:33:52 +01:00
parent ee5a3438f5
commit 6776d3c5c2
1 changed files with 11 additions and 2 deletions

View File

@ -177,6 +177,11 @@ class Handler implements MessageComponentInterface
'message' => $e->getMessage(), 'message' => $e->getMessage(),
], ],
])); ]));
// if sentry is defined capture exception
if (app()->bound('sentry')) {
app('sentry')->captureException($e);
}
} }
exit(0); exit(0);
@ -189,8 +194,12 @@ class Handler implements MessageComponentInterface
'line' => $e->getLine(), 'line' => $e->getLine(),
'trace' => $e->getTraceAsString(), 'trace' => $e->getTraceAsString(),
]); ]);
}
// if sentry is defined capture exception
if (app()->bound('sentry')) {
app('sentry')->captureException($e);
}
}
} }
/** /**
@ -494,7 +503,7 @@ class Handler implements MessageComponentInterface
// Update last online of user if user // Update last online of user if user
if (! optional($connection)->user) { if (! optional($connection)->user) {
$connection->user = false; $connection->user = false;
if($channel){ if ($channel) {
$channel->saveConnection($connection); $channel->saveConnection($connection);
} }
} }