Exception handling added at many places

This commit is contained in:
Michael 2024-08-25 18:35:24 +00:00
parent e6daaf49ce
commit 518382036b
16 changed files with 174 additions and 44 deletions

View file

@ -230,7 +230,11 @@ class ExAuth
$url = ($ssl ? 'https' : 'http') . '://' . $host . '/noscrape/' . $user;
$curlResult = DI::httpClient()->get($url, HttpClientAccept::JSON, [HttpClientOptions::REQUEST => HttpClientRequest::CONTACTVERIFIER]);
try {
$curlResult = DI::httpClient()->get($url, HttpClientAccept::JSON, [HttpClientOptions::REQUEST => HttpClientRequest::CONTACTVERIFIER]);
} catch (\Throwable $th) {
return false;
}
if (!$curlResult->isSuccess()) {
return false;