Skip to content

Commit 720c2a0

Browse files
committed
catch request exceptions in freontend status code check
1 parent 6c8a083 commit 720c2a0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/Jobs/UpdateSite.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
use App\Models\Site;
99
use App\RemoteSite\Connection;
1010
use App\RemoteSite\Responses\PrepareUpdate;
11+
use GuzzleHttp\Exception\RequestException;
1112
use Illuminate\Contracts\Queue\ShouldQueue;
1213
use Illuminate\Foundation\Queue\Queueable;
1314
use Illuminate\Support\Facades\App;
@@ -70,7 +71,11 @@ public function handle(): void
7071
}
7172

7273
// Store pre-update response code
73-
$this->preUpdateCode = $this->site->getFrontendStatus();
74+
try {
75+
$this->preUpdateCode = $this->site->getFrontendStatus();
76+
} catch (RequestException $e) {
77+
// Catch request exceptions - they should not stop the process
78+
}
7479

7580
// Let site fetch available updates
7681
$updateResult = $connection->getUpdate();

0 commit comments

Comments
 (0)