TOKU: FIX: exceptions

This commit is contained in:
Juan Pablo Vial
2025-06-10 17:48:36 -04:00
parent feef90afd6
commit 64047ef577
2 changed files with 5 additions and 3 deletions

View File

@ -4,7 +4,9 @@ namespace Incoviba\Service\Venta\MediosPago\Toku;
use DateMalformedStringException;
use DateTimeImmutable;
use DateTimeZone;
use PDOException;
use Psr\Http\Client\ClientInterface;
use Psr\Log\LoggerInterface;
use Incoviba\Common\Implement\Exception\EmptyResponse;
use Incoviba\Common\Implement\Exception\EmptyResult;
use Incoviba\Exception\InvalidResult;
@ -13,7 +15,6 @@ use Incoviba\Repository;
use Incoviba\Service\UF;
use Incoviba\Service\Venta\MediosPago\AbstractEndPoint;
use Incoviba\Service\Venta\Pago;
use Psr\Log\LoggerInterface;
class Invoice extends AbstractEndPoint
{
@ -68,7 +69,7 @@ class Invoice extends AbstractEndPoint
try {
$this->delete($tokuId);
$this->invoiceRepository->removeByTokuId($tokuId);
} catch (EmptyResponse $exception) {
} catch (EmptyResponse | PDOException $exception) {
$this->logger->warning($exception, ['invoice->toku_id' => $tokuId]);
}
}

View File

@ -1,6 +1,7 @@
<?php
namespace Incoviba\Service\Venta\MediosPago\Toku;
use PDOException;
use Psr\Http\Client\ClientInterface;
use Incoviba\Common\Implement\Exception\EmptyResponse;
use Incoviba\Common\Implement\Exception\EmptyResult;
@ -63,7 +64,7 @@ class Subscription extends AbstractEndPoint
try {
$this->delete($tokuId);
$this->subscriptionRepsitory->removeByTokuId($tokuId);
} catch (EmptyResponse $exception) {
} catch (EmptyResponse | PDOException $exception) {
$this->logger->warning($exception, ['subscription->toku_id' => $tokuId]);
}
}