https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42386 --- Comment #99 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 209854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209854&action=edit Bug 42386: Add error_code to hold placement API responses This patch adds a machine-readable error_code to the hold placement error responses of the REST API: - hold_date_in_future - item_biblio_mismatch - missing_biblio_or_item - patron_not_found - invalid_pickup_location - the CanItemBeReserved/CanBookBeReserved status (403), e.g. too_many_reserves, damaged - the Koha::Patron->can_place_holds reason (409), e.g. expired, debt_limit The spec documents the codes for each response. Test plan: 1. Apply patch 2. Run: $ ktd --shell k$ yarn api:bundle k$ prove t/db_dependent/api/v1/holds.t xt/api.t => SUCCESS: Tests pass! 3. Sign off :-D Co-authored-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.