Hi all,
I have a queueable job which might fail sometimes.
When it fails i need a few records to be updated in the initial model that is used.
in the job class i added a failed method
public function failed(Exception $exception)
{
$this->feed_connection->scheduled = 0;
$this->feed_connection->running = 0;
$this->feed_connection->failed = 1;
$this->feed_connection->last_failed_date = Carbon::now();
$this->feed_connection->save();
}
But when i use this i get several errors like:
local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to App\Jobs\processXmlConnection::failed() must be an instance of App\Jobs\Exception, instance of Symfony\Component\Debug\Exception\FatalThrowableError given
and
local.ERROR: Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Argument 1 passed to App\Jobs\processXmlConnection::failed() must be an instance of App\Jobs\Exception, instance of Nathanmac\Utilities\Parser\Exceptions\ParserException given
Probably something missing here but i tried everything. Anybody got a clue?