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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 18 Jul 2023 14:06:50 +0000 (14:06 +0000)
commit76baece36319c6fd21d2752424114f03ed59ce12
treefc73cf2728fd6ac958d103b0b816bbd613cfd8cd
parente03ea17b97eb43f71c1dd3cb04c81a154ca7a291
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>
(cherry picked from commit 5f43478512a884243bb56f8eac2d8b4dc8211d96)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit cf31471089e856010c511dc585dfe4a6a62a38f2)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
catalogue/image.pl
opac/opac-image.pl