Bug 33047: Return 404 instead of 500 when biblio does not exist
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 11 May 2023 13:49:08 +0000 (15:49 +0200)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 10 Jul 2023 18:43:14 +0000 (15:43 -0300)
commit5f43478512a884243bb56f8eac2d8b4dc8211d96
treee6a2d1a40b6e3648b34017427d54c44e68aec8ba
parent72dd43c051f3d8435866f4fb9284541c6ef555b1
Bug 33047: Return 404 instead of 500 when biblio does not exist

If the biblionumber or the itemnumber passed in parameter does not
exist we should return 404 instead of exploding with a 500.

Test plan:
Attach cover images to biblio and items
Notice that the UI is working correctly (staff and OPAC)
Hit catalogue/image.pl and opac/opac-image.pl with non-existent
biblionumber and imagenumber
Notice that you now get 404 instead of 500

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
catalogue/image.pl
opac/opac-image.pl