Correct exceptions
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user