From 58562746a390fe98d96a14e430cde2c77cb06f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20P=C5=82aczek?= Date: Sat, 19 Oct 2024 16:37:41 +0200 Subject: [PATCH] Thrown product not found exception. --- src/Controller/ProductController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Controller/ProductController.php b/src/Controller/ProductController.php index a6f5b81..b15e938 100644 --- a/src/Controller/ProductController.php +++ b/src/Controller/ProductController.php @@ -25,7 +25,7 @@ final class ProductController extends BaseController ])->find($productId); if(null === $product) { - throw new ItemNotFoundException('Product not found'); + throw $this->createNotFoundException('Product not found'); } $priceList = $product->price()->pluck('price')->implode(',');