https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36613 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Wrong return statuses on |Tidy merge biblio feature |merge biblio feature | --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- There are also a few things to consider: * Creating a 'merge' resource should return a 201. * The use of `respond_to` doesn't look correct. You either always return mij, or have some fallback mechanism. I tried tweaking the tests so they pass application/marc and even though the operation succeeded, I got an empty reply and a 204 instead of a 200!: ``` # Failed test '200 OK' # at t/db_dependent/api/v1/biblios.t line 2155. # got: '204' # expected: '200' # Failed test 'Update with Marc-in-json record' # at t/db_dependent/api/v1/biblios.t line 2159. # '' # doesn't match '(?^u:Using mij)' # Looks like you failed 2 tests of 12. ``` so not a failure, or an explosion, just a weird behavior! * the `catch` block is returning a 400 instead of a 500 (unhandled server error). I assume there were reasons to return a 400. I think they should be individually handled properly, and then fallback to 500. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.