https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386
--- Comment #33 from Tomás Cohen Arazi (tcohen) <[email protected]> --- Created attachment 201604 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201604&action=edit Bug 42386: (follow-up) Add error_code to hold placement API responses Several hold-related error responses in the REST API returned an error message string but no machine-readable error_code, making it impossible for third-party consumers to programmatically handle specific failures. This patch adds error_code to: - Hold date in future (hold_date_in_future) - Item/biblio mismatch (item_biblio_mismatch) - Missing biblio_id/item_id (missing_biblio_or_item) - Patron not found (patron_not_found) - Invalid pickup location (invalid_pickup_location) - CanItemBeReserved/CanBookBeReserved failure (dynamic, uses the status code from the availability check, e.g. too_many_reserves, damaged) Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ prove t/db_dependent/api/v1/holds.t => SUCCESS: Tests pass! 3. Sign off :-D -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
