[Bug 29772] New: Make DELETE /patrons return error codes in error conditions
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Bug ID: 29772 Summary: Make DELETE /patrons return error codes in error conditions Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: REST API Assignee: koha-bugs@lists.koha-community.org Reporter: tomascohen@gmail.com Bug 28020 introduces the option to return error codes instead of just textual descriptions. Let's use that! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |28020, 29765 Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |tomascohen@gmail.com |ity.org | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28020 [Bug 28020] Error responses should return a code https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29765 [Bug 29765] Make Koha::Patron->safe_to_delete return a Koha::Result::Boolean object -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 --- Comment #1 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128924&action=edit Bug 29772: Regression tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 --- Comment #2 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128925 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128925&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 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 128926 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128926&action=edit Bug 29772: (follow-up) Document error codes -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Make DELETE /patrons return |Make DELETE |error codes in error |/patrons/:patron_id return |conditions |error codes in error | |conditions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128924|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 128941 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128941&action=edit Bug 29772: Regression tests Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128925|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 128942 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128942&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@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128926|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 128943 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128943&action=edit Bug 29772: (follow-up) Document error codes Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128941|0 |1 is obsolete| | --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129001 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129001&action=edit Bug 29772: Regression tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128942|0 |1 is obsolete| | --- Comment #8 from Jonathan Druart <jonathan.druart+koha@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@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128943|0 |1 is obsolete| | --- Comment #9 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Created attachment 129003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=129003&action=edit Bug 29772: (follow-up) Document error codes Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Bug 29772 depends on bug 28020, which changed state. Bug 28020 Summary: Error responses should return a code https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28020 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Bug 29772 depends on bug 29765, which changed state. Bug 29765 Summary: Make Koha::Patron->safe_to_delete return a Koha::Result::Boolean object https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29765 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29772 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED CC| |kyle@bywatersolutions.com Status|Pushed to master |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org