I'm using Laravel Horizon which has a Failed Jobs section which used to work fine. Until I added the Sentry notification for failed jobs, in Job's Class.
/**
* Handle a job failure.
*
* @return void
*/
public function failed(\Exception $exception)
{
if ( app()->bound('sentry') ) {
app('sentry')->captureException($exception);
}
}
Now, when visiting the Failed Jobs tab in Horizon - it results in fatal error with memory exceeded. How can I make both Horizon and this sentry notification work?