Skip to content

magento2.4

Auto Added by WPeMatico

getting error at random in magento2 website admin and frontend

Notice: Undefined index: frontend in vendor/magento/framework/App/Cache/Frontend/Pool.php on line 90 Warning: array_replace_recursive(): Expected parameter 2 to be an array, null given in vendor/magento/framework/App/Cache/Frontend/Pool.php on line 90 Warning: Invalid argument supplied for foreach() in vendor/magento/framework/App/Cache/Frontend/Pool.php on line 68 Fatal error: Uncaught InvalidArgumentException:… Read More »getting error at random in magento2 website admin and frontend

Get concrete error message of CouldNotSaveException

We need to get concrete error message when MagentoCatalogModelProductRepository throws CouldNotSaveException during saveProduct() private function saveProduct($product): void { try { $this->removeProductFromLocalCacheBySku($product->getSku()); $this->removeProductFromLocalCacheById($product->getId()); $this->resourceModel->save($product); } catch (ConnectionException $exception) { … } catch (Exception $e) { throw new CouldNotSaveException( __(‘The product was… Read More »Get concrete error message of CouldNotSaveException