chore: update Exception type

This commit is contained in:
Maël Gangloff
2024-08-23 03:02:46 +02:00
parent 98f84f32cf
commit eeb2477611
2 changed files with 3 additions and 5 deletions

View File

@@ -84,8 +84,7 @@
"symfony/zulip-notifier": "7.1.*",
"symfonycasts/verify-email-bundle": "*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0",
"ext-http": "*"
"twig/twig": "^2.12|^3.0"
},
"config": {
"allow-plugins": {

View File

@@ -3,7 +3,6 @@
namespace App\Config\Provider;
use App\Entity\Domain;
use http\Exception\InvalidArgumentException;
use Psr\Cache\CacheItemInterface;
use Symfony\Component\HttpClient\HttpOptions;
use Symfony\Component\HttpFoundation\Response;
@@ -30,12 +29,12 @@ class GandiProvider extends AbstractProvider
public function orderDomain(Domain $domain, bool $dryRun = false): void
{
if (!$domain->getDeleted()) {
throw new InvalidArgumentException('The domain name still appears in the WHOIS database');
throw new \Exception('The domain name still appears in the WHOIS database');
}
$ldhName = $domain->getLdhName();
if (!$ldhName) {
throw new InvalidArgumentException('Domain name cannot be null');
throw new \Exception('Domain name cannot be null');
}
$authData = self::verifyAuthData($this->authData, $this->client);