Skip to content
Snippets Groups Projects
Commit fd03b57a authored by Tibo's avatar Tibo
Browse files

Catch guzzle exception

parent da65f211
No related branches found
No related tags found
No related merge requests found
Pipeline #1700 failed
......@@ -17,11 +17,13 @@ class ClientVersion extends \App\AbstractSensor
public function latestVersion()
{
$client = new Client([
'timeout' => 2.0,
'timeout' => 5.0,
]);
$json = $client->get(self::MANIFEST)->getBody();
if ($json === false) {
try {
$json = $client->get(self::MANIFEST)->getBody();
} catch (\Exception $ex) {
return "";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment