Skip to content

Commit ccabf32

Browse files
committed
error logging
1 parent 05328af commit ccabf32

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Handler.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public function handleWebsocket(WebsocketEvent $event, Context $context): HttpRe
3636

3737
return new HttpResponse('OK');
3838
} catch (Throwable $throwable) {
39+
if (app()->bound('sentry')) {
40+
app('sentry')->captureMessage('An error happened:');
41+
app('sentry')->captureException($throwable);
42+
}
43+
44+
3945
$this->exceptionHandler->report($throwable);
4046

4147
throw $throwable;

0 commit comments

Comments
 (0)