vendor/shopware/core/Content/ProductExport/Exception/ExportNotFoundException.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\ProductExport\Exception;
  3. use Shopware\Core\Framework\Log\Package;
  4. use Shopware\Core\Framework\ShopwareHttpException;
  5. use Symfony\Component\HttpFoundation\Response;
  6. #[Package('inventory')]
  7. class ExportNotFoundException extends ShopwareHttpException
  8. {
  9.     public function __construct(?string $id null, ?string $fileName null)
  10.     {
  11.         $message 'No product exports found';
  12.         if ($id) {
  13.             $message 'Product export with ID {{ id }} not found';
  14.         } elseif ($fileName) {
  15.             $message 'Product export with file name {{ fileName }} not found. Please check your access key.';
  16.         }
  17.         parent::__construct($message, ['id' => $id'fileName' => $fileName]);
  18.     }
  19.     public function getStatusCode(): int
  20.     {
  21.         return Response::HTTP_NOT_FOUND;
  22.     }
  23.     public function getErrorCode(): string
  24.     {
  25.         return 'CONTENT__PRODUCT_EXPORT_NOT_FOUND';
  26.     }
  27. }