Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26111

Url to non-existing cluster image returns error 500, should return 404 instead

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 5.4.5
    • None
    • None

    Description

      Trying to access a random var/storage/images/... url results in an error 500, but an error 404 is what I would expect instead.

      1st step: fix issue https://jira.ez.no/browse/EZP-25991

      2nd step: catch the BinaryFileNotFoundException and return a 404.

      What I get at the moment is:

      [2016-07-20 12:49:59] request.CRITICAL: Uncaught PHP Exception eZ\Publish\Core\IO\Exception\BinaryFileNotFoundException: "Could not find 'BinaryFile' with identifier 'images/users/analysts/oleksiy-danilin/31226481-2-eng-GB/Oleksiy-Danilin_analystpicture3.jpg'" at /srv/www/mysiste/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/IO/IOMetadataHandler/LegacyDFSCluster.php line 232

      {"exception":"[object] (eZ\\Publish\\Core\\IO\\Exception\\BinaryFileNotFoundException(code: 404): Could not find 'BinaryFile' with identifier 'images/users/analysts/oleksiy-danilin/31226481-2-eng-GB/Oleksiy-Danilin_analystpicture3.jpg' at /srv/www/www.ovumkc.com/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/IO/IOMetadataHandler/LegacyDFSCluster.php:232)"}

      []

      Attachments

        Activity

          People

            Unassigned Unassigned
            72f8acac-185f-4a54-9470-a7473f50daab@accounts.ibexa.co Gaetano Giunta
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: