[Koha-bugs] [Bug 31797] REST API: DELETE endpoint for Items

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jan 27 14:15:20 CET 2023


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

--- Comment #5 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Martin Renvoize from comment #4)
> Code generally looks solid.. but I have 2 minor queries.
> 
> 1. I believe we decided it was OK sticking to english for error descriptions
> in the API and that code could easily be used by end users for
> translations.. though I can't find reference to that conversation right now.

When we started the API, we only had a textual description of the error, in the
'error' key. Then bug 28020 introduced error codes. It included the
introduction of a markup notation to describe such possible error codes for
rendering in api.koha-community.org

> 2. I find it a little annoying that we only send the first error instead of
> an array of all errors that apply.  Perhaps we should think about that here?

Yeah. Unfortunately:
- The API would require a refactoring to allow that (i.e. all endpoints return
one error...)
- It would imply refactoring Koha::Item->safe_to_delete as well, which I'm not
against (provided we have a switch to avoid performance penalties in things
like batch deletes), but that's a major change for a more complete error
response.

I don't feel it is worth right now.

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


More information about the Koha-bugs mailing list