Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Sep 9, 2020
1 parent 4d13637 commit fcebd6c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CallWebhookJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\Response;
use Illuminate\Bus\Queueable;
Expand Down Expand Up @@ -85,6 +86,11 @@ public function handle()
$this->errorMessage = $exception->getMessage();
}

if ($exception instanceof ConnectException) {
$this->errorType = get_class($exception);
$this->errorMessage = $exception->getMessage();
}

if (! $lastAttempt) {
/** @var \Spatie\WebhookServer\BackoffStrategy\BackoffStrategy $backoffStrategy */
$backoffStrategy = app($this->backoffStrategyClass);
Expand Down

0 comments on commit fcebd6c

Please sign in to comment.