code: public function getProducts()
      {
          try {
  
              // read product data from storage
              $productDataArray = $this->productStorage->read();
  
              // deserialize the product data
              $products = [];
              foreach ($productDataArray as $productData) {
                  $products[] = $this->productMapper->getProduct($productData);
              }
  
              return $products;
  
          } catch (\Exception $readException) {
              throw new RepositoryException("Failed to read products from storage provider.", $readException);
          }
      }
docs: Get all products
  
  @return Product[]
  
  @throws RepositoryException If fetching the products failed