https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38926 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #176796|0 |1 is obsolete| | --- Comment #4 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 176835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=176835&action=edit 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 -- You are receiving this mail because: You are watching all bug changes.