diff --git a/services/StockService.php b/services/StockService.php index 4677752c..f39bdd00 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -699,7 +699,7 @@ class StockService extends BaseService $gc = new Grocycode($barcode); if ($gc->GetType() != Grocycode::PRODUCT) { - throw new \Exception("Grocycode $barcode is not a product code"); + throw new \Exception('Invalid grocycode'); } return intval($gc->GetId()); }