Catch exception when trying to connect to update server

This commit is contained in:
Deon George 2024-01-14 13:02:16 +11:00
parent eda3680997
commit cb06f3dcb6

View File

@ -39,6 +39,8 @@ class CheckUpdate
$client = new Client;
try {
$response = $client->request('POST',sprintf('%s/%s',self::UPDATE_SERVER,strtolower(config('app.version'))));
if ($response->getStatusCode() === 200) {
@ -49,6 +51,10 @@ class CheckUpdate
return $result;
}
} catch (\Exception $e) {
Log::debug(sprintf('CU_:- Exception connecting to update server'),['e'=>get_class($e)]);
}
return NULL;
});
}