Correct exceptions

This commit is contained in:
Juan Pablo Vial
2025-10-17 12:26:46 -03:00
parent 06558d778d
commit 71309e13a0
2 changed files with 9 additions and 2 deletions

View File

@ -4,8 +4,11 @@ namespace Incoviba\Controller\API\Ventas;
use DateTimeImmutable;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Log\LoggerInterface;
use Incoviba\Common\Implement\Exception\EmptyResult;
use Incoviba\Controller\API\withJson;
use Incoviba\Exception\ServiceAction\Read;
use Incoviba\Exception\ServiceAction\Update;
use Incoviba\Repository;
use Incoviba\Service;
@ -42,7 +45,7 @@ class Escrituras
try {
$escrituraService->edit($venta_id, $body);
$output['success'] = true;
} catch (EmptyResult) {}
} catch (Read|Update|EmptyResult) {}
return $this->withJson($response, $output);
}
}