Koha/svc
Phil Ringnalda 3d1b38b0ad
Bug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist
Changing from GetMarcBiblio to Biblios->find plus metadata->record lost the
way that svc/bib used to return 404 when the bib number wasn't found. This
patch restores that by checking for undef after the Biblios->find step.

Test plan:
1. Load e.g. http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 which returns an
   XML bib record
2. Load http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 500 error
2. Appply patch, restart_all
4. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/289 and get the bib again
5. Reload http://127.0.0.1:8081/cgi-bin/koha/svc/bib/99999999 and get a 404

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2024-06-27 11:50:00 +02:00
..
cataloguing
club Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
config
letters
mana Bug 36418: Catch more cases where header response should be application/json 2024-04-02 17:59:04 +02:00
members
records
virtualshelves
article_request Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
authentication Bug 36700: Update svc to use CSRF-TOKEN 2024-05-01 13:40:19 +01:00
authorised_values
barcode
bib Bug 36891: Restore returning 404 from svc/bib when the bib number doesn't exist 2024-06-27 11:50:00 +02:00
bib_framework
bib_profile
checkin
checkout_notes
checkouts Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
convert_report
cover_images
creator_batches
holds Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
import_bib Bug 33418: Add overlay_framework option to connexion scripts 2024-05-10 16:45:50 +02:00
localization
new_bib
problem_reports
recall Bug 36418: Catch more cases where header response should be application/json 2024-04-02 17:59:04 +02:00
renew
report
return_claims Bug 36418: Set header response content type to application/json - svc 2024-04-02 17:59:04 +02:00
split_callnumbers