[Koha-bugs] [Bug 29772] Make DELETE /patrons/:patron_id return error codes in error conditions

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 4 16:21:30 CET 2022


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

Jonathan Druart <jonathan.druart+koha at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #128942|0                           |1
        is obsolete|                            |

--- Comment #8 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
Created attachment 129002
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129002&action=edit
Bug 29772: Make DELETE /patrons/:patron_id return error codes

This patch makes the controller add the error_code attribute on error
conditions payload.

To test:
1. Apply the regression tests patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> FAIL: Boo, the API doesn't include the error_code attribute on the
error responses for the DELETE /patrons/:patron_id route
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass! error_code is included in the response!
5. Sign off :-D

Signed-off-by: David Nind <david at davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart at bugs.koha-community.org>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list