Ignore Json error as it's expected

This commit is contained in:
Matteo Gheza 2023-10-08 13:37:29 +02:00
parent f0d917600b
commit 1a221be19f
2 changed files with 9 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class WebhookController extends
if($this->user) return $this->user;
try {
$this->user = $this->message->from()->storage()->get('user', null);
} catch (\Exception $e) {
} catch (\Exception|\Throwable|\Error $e) {
$this->user = null;
}

View File

@ -56,6 +56,14 @@ return [
'http_client_requests' => env('SENTRY_BREADCRUMBS_HTTP_CLIENT_REQUESTS_ENABLED', true),
],
'before_send' => function (\Sentry\Event $event, ?\Sentry\EventHint $hint): ?\Sentry\Event {
if ($hint !== null && $hint->exception instanceof JsonException) {
return null;
}
return $event;
},
// Performance monitoring specific configuration
'tracing' => [
// Trace queue jobs as their own transactions (this enables tracing for queue jobs)