FIX: Manejo de Errores en Ventas

This commit is contained in:
Juan Pablo Vial
2025-05-29 16:02:13 -04:00
parent 6e0e1fc75e
commit ace205798f

View File

@ -217,7 +217,8 @@ class Ventas extends Controller
$this->saveRedis($redisService, "venta:{$venta->id}", $venta);
$output['venta_id'] = $venta->id;
$output['status'] = true;
} catch (EmptyResult | PDOException $exception) {
} catch (Create | Update $exception) {
$this->logger->error($exception->getMessage());
$output['errors'] = [
'code' => $exception->getCode(),
'message' => $exception->getMessage(),