https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42383 --- Comment #121 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 209781 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209781&action=edit Bug 42383: (QA follow-up) Make returning error responses opt-in in HttpClient The check-in page needs the raw response of POST /checkins for error statuses too (412 confirmation, 403 blocked, 404 not found), so an earlier patch made HttpClient::_fetchJSON return the response object for non-2xx responses whenever return_response was set. But delete() and count() default return_response to true, so every DELETE and count request in the Vue apps stopped going through the error handling: errors were no longer thrown nor reported with setError(), and callers treated failures as successes. This patch (QA comment point 1) restores the previous behaviour for return_response and adds a separate return_error_response parameter, false by default. It is only passed by post(), and only the check-in client sets it (checkins.create, and checkins.cancelHold whose refusals carry the module policy). Test plan: 1. Apply this patch and rebuild: $ ktd --shell k$ yarn js:build k$ restart_all 2. Check in items on the check-in page, including: - an item that is not checked out - a barcode that does not exist - an item that requires a confirmation (e.g. a lost item with BlockReturnOfLostItems set) => SUCCESS: The page behaves as before: the right messages, modals and confirmation prompts are displayed 3. In the ERM module, try deleting an agreement that cannot be deleted (e.g. edit it in another tab and delete it there first, then delete it again from the first tab) => SUCCESS: The error is displayed at the top of the page, as it was before the check-in patches 4. Sign off :-D Assisted-by: Opus 5.5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.