diff --git a/app/Exceptions/ExceptionHandler.php b/app/Exceptions/ExceptionHandler.php index 316887aca..79492d1b8 100644 --- a/app/Exceptions/ExceptionHandler.php +++ b/app/Exceptions/ExceptionHandler.php @@ -87,7 +87,11 @@ class ExceptionHandler extends Handler public function report(Exception $e) { - if (!setting_value('visiosoft.module.advs::disable_sentry') && app()->bound('sentry') && $this->shouldReport($e)) { + if (!setting_value('visiosoft.module.advs::disable_sentry') + && app()->bound('sentry') + && $this->shouldReport($e) + && env('SENTRY_LARAVEL_DSN')) { + app('sentry')->captureException($e); }