https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19814

--- Comment #92 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 203247
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203247&action=edit
Bug 19814: (follow-up) Warn on batch state JSON failures

The three eval-guarded encode_json / decode_json calls that
round-trip batch checkin results through the hidden
batch_completed_results form field previously swallowed any
exception silently. A corrupt or oversized payload would just
produce an empty completed-results list on the next request with no
trace in the logs.

Log each failure through Koha::Logger so operators can see why batch
state was lost.

Test plan:
1. Open a batch checkin that triggers the confirm modal (so a
   batch_completed_results value is actually round-tripped).
2. Edit the browser DevTools network tab (or use a browser form
   inspector) to replace the batch_completed_results hidden value
   with an obviously-invalid string, e.g. "not-json", and submit.
3. Confirm the request still renders (no 500), and that
   plack-intranet-error.log contains the Koha::Logger warning
   "Failed to decode batch_completed_results JSON: ...".
4. Normal batch submissions should log nothing new.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to