Koha-clms/api/v1/swagger/paths
Tomas Cohen Arazi a98760a994
Bug 38926: Make POST /biblios return 400 if AddBiblio fails
We don't have proper exceptions in the `C4::Biblio::AddBiblio` method,
but we at least know `$biblio_id` will be `undef` in the even of an
error processing the call.

This patch makes the controller handle this situation so (at least) it
is obvious that something bad happened.

To test:
1. Apply the regression tests patch
2. Run:
   $ ktd --shell
  k$ prove t/db_dependent/api/v1/biblios.t
=> FAIL: Tests fail! The endpoint returns 200 even on error!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! The endpoint returns a 400 with a reasonable
message!
5. Sign off :-D

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
2025-01-24 12:02:16 +01:00
..
acquisitions_baskets.yaml Bug 38204: Add api endpoint to list baskets 2024-10-30 07:47:40 +01:00
acquisitions_edifiles.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
acquisitions_funds.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
acquisitions_orders.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
acquisitions_vendor_issues.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
acquisitions_vendors.yaml Bug 38390: Add subscriptions+count to vendors embed 2024-11-11 17:43:23 +01:00
advancededitormacros.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
article_requests.yaml Bug 30194: (follow-up) Simply OpenAPI Specification 2022-03-29 16:44:31 +02:00
auth.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
authorised_value_categories.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
authorised_values.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
authorities.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
biblios.yaml Bug 38926: Make POST /biblios return 400 if AddBiblio fails 2025-01-24 12:02:16 +01:00
biblios_item_groups.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
biblios_merge.yaml Bug 37791: Fix 'Biblio not found' messages on the API 2024-10-11 12:21:29 +02:00
bookings.yaml Bug 33736: (follow-up) Remove top-level embed in bookings.yaml 2024-10-25 11:09:57 +02:00
cash_registers.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
checkouts.yaml Bug 37809: (follow-up) Allow embedding item.biblio too 2024-11-11 14:12:19 +01:00
circulation_rules.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
cities.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
clubs.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
config_smtp_servers.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
deleted_biblios.yaml Bug 37791: Fix 'Biblio not found' messages on the API 2024-10-11 12:21:29 +02:00
erm_agreements.yaml Bug 37576: Add additional fields for ERM agreements 2024-11-08 16:09:17 +01:00
erm_config.yaml Bug 34387: Improve API docs naming consistency 2023-08-15 11:25:35 +03:00
erm_counter_files.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_counter_logs.yaml Bug 36627: Rename embed method to patron 2024-12-23 13:36:14 +01:00
erm_counter_registries.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_custom_reports.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_default_usage_reports.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_documents.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_eholdings_packages.yaml Bug 37577: Add additional fields for ERM packages 2024-11-08 16:09:19 +01:00
erm_eholdings_packages_resources.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_eholdings_resources.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_eholdings_titles.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_eholdings_titles_resources.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_licenses.yaml Bug 35287: REST API - Add additional fields support to ERM Licenses 2024-10-24 13:38:19 +02:00
erm_sushi_services.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_usage_data_providers.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_usage_databases.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_usage_items.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_usage_platforms.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_usage_titles.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
erm_users.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
extended_attribute_types.yaml Bug 37577: Add additional fields for ERM packages 2024-11-08 16:09:19 +01:00
holds.yaml Bug 30661: Allow to update more hold parameters via REST API 2024-10-25 11:09:52 +02:00
ill_backends.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
ill_batches.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
ill_batchstatuses.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
ill_requests.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
import_batch_profiles.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
import_batches.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
item_types.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
items.yaml Bug 35906: Remove preference and add override handling 2024-10-25 15:34:41 +02:00
jobs.yaml Revert "Bug 36217: Fix background jobs page's include_last_hour filter" 2024-10-18 14:26:01 +02:00
libraries.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
lists.yaml Bug 28965: Add /public/lists 2024-11-08 16:09:21 +01:00
oauth.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
patron_categories.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
patrons.yaml Bug 28633: Add preferred name field to patrons 2024-11-11 14:12:09 +01:00
patrons_account.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
patrons_checkouts.yaml Bug 37809: (follow-up) Allow embedding item.biblio too 2024-11-11 14:12:19 +01:00
patrons_extended_attributes.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
patrons_holds.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
patrons_password.yaml Bug 29926: (QA follow-up) Date format missing in spec 2022-05-06 10:33:10 -10:00
patrons_recalls.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
preservation_config.yaml Bug 36565: Preservation module API docs fixes (bug 30708 follow-up) 2024-04-29 09:35:36 +02:00
preservation_processings.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
preservation_trains.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
preservation_waiting_list.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
public_oauth.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
public_patrons.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
quotes.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
record_sources.yaml Bug 37513: Allow embedding usage_count in record sources 2024-08-27 12:14:25 +02:00
return_claims.yaml Bug 33292: Add logic to handle refunding a lost fee 2024-10-24 13:38:15 +02:00
rotas.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
search_filters.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
suggestions.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
tickets.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00
transfer_limits.yaml Bug 37018: Add 400 response definition to all routes 2024-08-01 17:26:44 +02:00