Summary: | Make DELETE /patrons/:patron_id return error codes in error conditions | ||
---|---|---|---|
Product: | Koha | Reporter: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Component: | REST API | Assignee: | Tomás Cohen Arazi (tcohen) <tomascohen> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | kyle |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.05.00
|
|
Circulation function: | |||
Bug Depends on: | 28020, 29765 | ||
Bug Blocks: | |||
Attachments: |
Bug 29772: Regression tests
Bug 29772: Make DELETE /patrons/:patron_id return error codes Bug 29772: (follow-up) Document error codes Bug 29772: Regression tests Bug 29772: Make DELETE /patrons/:patron_id return error codes Bug 29772: (follow-up) Document error codes Bug 29772: Regression tests Bug 29772: Make DELETE /patrons/:patron_id return error codes Bug 29772: (follow-up) Document error codes |
Description
Tomás Cohen Arazi (tcohen)
2021-12-27 13:39:34 UTC
Created attachment 128924 [details] [review] Bug 29772: Regression tests Created attachment 128925 [details] [review] 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 Created attachment 128926 [details] [review] Bug 29772: (follow-up) Document error codes Created attachment 128941 [details] [review] Bug 29772: Regression tests Signed-off-by: David Nind <david@davidnind.com> Created attachment 128942 [details] [review] 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> Created attachment 128943 [details] [review] Bug 29772: (follow-up) Document error codes Signed-off-by: David Nind <david@davidnind.com> Created attachment 129001 [details] [review] Bug 29772: Regression tests Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 129002 [details] [review] 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> Created attachment 129003 [details] [review] 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> Pushed to master for 22.05, thanks to everybody involved [U+1F984] |