Fix job failed error type

This commit is contained in:
Matteo Gheza 2023-09-03 22:03:26 +02:00
parent 65062f3c16
commit 388148356b
3 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ class NotifyUsersManualModeOn implements ShouldQueue
}
}
public function failed(\Exception $exception)
public function failed(\Error|\TypeError $exception = null)
{
if (app()->bound('sentry')) {
app('sentry')->captureException($exception);

View File

@ -50,7 +50,7 @@ class ResetAvailabilityMinutes implements ShouldQueue
}
}
public function failed(\Exception $exception)
public function failed(\Error|\TypeError $exception = null)
{
if (app()->bound('sentry')) {
app('sentry')->captureException($exception);

View File

@ -97,9 +97,9 @@ class UpdateAvailabilityWithSchedulesJob implements ShouldQueue
}
}
public function failed(\Exception $exception)
public function failed(\Error|\TypeError $exception = null)
{
if (app()->bound('sentry')) {
if (app()->bound('sentry') && !is_null($exception)) {
app('sentry')->captureException($exception);
}
}