Catch Curl error when updating projects

This commit is contained in:
Alex Cabal 2025-04-29 12:42:31 -05:00
parent 0490ba2951
commit 6c5caa2642

View file

@ -574,6 +574,7 @@ final class Project{
return;
}
try{
$curl = curl_init($this->VcsUrl);
curl_setopt($curl, CURLOPT_CUSTOMREQUEST, Enums\HttpMethod::Head->value); // Only perform HTTP HEAD.
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
@ -589,6 +590,10 @@ final class Project{
$this->IsVcsUrlUpdated = true;
}
catch(Safe\Exceptions\CurlException){
// Probably a temporary failure, just continue but don't mark the URL as having been updated.
}
}
/**
* Update this object's `$LastCommitTimestamp` with data from its GitHub repo.