mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add tld properties
This commit is contained in:
@@ -10,6 +10,7 @@ use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface;
|
||||
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
||||
use Throwable;
|
||||
|
||||
#[AsMessageHandler]
|
||||
final readonly class UpdateRdapServersHandler
|
||||
@@ -25,10 +26,28 @@ final readonly class UpdateRdapServersHandler
|
||||
* @throws ServerExceptionInterface
|
||||
* @throws RedirectionExceptionInterface
|
||||
* @throws DecodingExceptionInterface
|
||||
* @throws ClientExceptionInterface
|
||||
* @throws ClientExceptionInterface|Throwable
|
||||
*/
|
||||
public function __invoke(UpdateRdapServers $message): void
|
||||
{
|
||||
$this->RDAPService->updateRDAPServers();
|
||||
/** @var Throwable[] $throws */
|
||||
$throws = [];
|
||||
try {
|
||||
$this->RDAPService->updateTldListIANA();
|
||||
} catch (Throwable $throwable) {
|
||||
$throws[] = $throwable;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->RDAPService->updateGTldListICANN();
|
||||
} catch (Throwable $throwable) {
|
||||
$throws[] = $throwable;
|
||||
}
|
||||
try {
|
||||
$this->RDAPService->updateRDAPServers();
|
||||
} catch (Throwable $throwable) {
|
||||
$throws[] = $throwable;
|
||||
}
|
||||
if (!empty($throwable)) throw $throws[0];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user