mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
refactor: change log level and add exceptions
This commit is contained in:
@@ -7,8 +7,8 @@ use ApiPlatform\State\ProcessorInterface;
|
||||
use App\Config\ConnectorProvider;
|
||||
use App\Entity\Connector;
|
||||
use App\Entity\User;
|
||||
use App\Service\Connector\AbstractProvider;
|
||||
use App\Service\Connector\EppClientProvider;
|
||||
use App\Service\Provider\AbstractProvider;
|
||||
use App\Service\Provider\EppClientProvider;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
|
||||
@@ -6,7 +6,7 @@ use ApiPlatform\Metadata\Operation;
|
||||
use ApiPlatform\State\ProcessorInterface;
|
||||
use App\Config\ConnectorProvider;
|
||||
use App\Entity\Connector;
|
||||
use App\Service\Connector\EppClientProvider;
|
||||
use App\Service\Provider\EppClientProvider;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
use Symfony\Component\Filesystem\Filesystem;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
|
||||
@@ -9,7 +9,7 @@ use App\Entity\User;
|
||||
use App\Entity\WatchList;
|
||||
use App\Notifier\TestChatNotification;
|
||||
use App\Service\ChatNotificationService;
|
||||
use App\Service\Connector\AbstractProvider;
|
||||
use App\Service\Provider\AbstractProvider;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
@@ -68,7 +68,7 @@ readonly class WatchListUpdateProcessor implements ProcessorInterface
|
||||
foreach ($data->getDomains()->getIterator() as $domain) {
|
||||
if (in_array($domain, $trackedDomains)) {
|
||||
$ldhName = $domain->getLdhName();
|
||||
$this->logger->notice('User tried to update a watchlist : it is forbidden to register the same domain name twice with limited mode', [
|
||||
$this->logger->notice('User tried to update a Watchlist : it is forbidden to register the same domain name twice with limited mode', [
|
||||
'username' => $user->getUserIdentifier(),
|
||||
'watchlist' => $data->getToken(),
|
||||
'ldhName' => $ldhName,
|
||||
@@ -117,7 +117,7 @@ readonly class WatchListUpdateProcessor implements ProcessorInterface
|
||||
$supported = $connectorProvider->isSupported(...$data->getDomains()->toArray());
|
||||
|
||||
if (!$supported) {
|
||||
$this->logger->notice('Connector does not support all TLDs in this Watchlist', [
|
||||
$this->logger->debug('Connector does not support all TLDs in this Watchlist', [
|
||||
'username' => $user->getUserIdentifier(),
|
||||
'connector' => $connector->getId(),
|
||||
'provider' => $connector->getProvider()->value,
|
||||
|
||||
Reference in New Issue
Block a user