Skip to content

Commit d5a7bac

Browse files
divinevagrant
authored andcommitted
Fix format exception in failed jobs
Format exception to string so it can be saved correctly. See https://github.com/laravel/framework/blob/6.x/src/Illuminate/Queue/Failed/DatabaseFailedJobProvider.php#L59
1 parent c0966a9 commit d5a7bac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Jenssegers/Mongodb/Queue/Failed/MongoFailedJobProvider.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ class MongoFailedJobProvider extends DatabaseFailedJobProvider
1212
* @param string $connection
1313
* @param string $queue
1414
* @param string $payload
15+
* @param \Exception $exception
1516
* @return void
1617
*/
1718
public function log($connection, $queue, $payload, $exception)
1819
{
1920
$failed_at = Carbon::now()->getTimestamp();
2021

22+
$exception = (string) $exception;
23+
2124
$this->getTable()->insert(compact('connection', 'queue', 'payload', 'failed_at', 'exception'));
2225
}
2326

0 commit comments

Comments
 (0)