[Koha-devel] API error responses change

Tomas Cohen Arazi tomascohen at gmail.com
Mon Dec 27 14:50:01 CET 2021


Hi all, I wanted to mention that I've submitted patches for bug 28020 [1].
The change introduces a new attribute to the generic error response object
that is reused everywhere in the spec. The new attribute is called
'error_code' and is intended to be adopted so API consumers have better
means to deal with error responses.
Remember that right now we return an error status (e.g. 409) and a (too)
generic description in textual form (e.g. Conflict found).

A good use case for this can be seen here [2], in which we already have a
handy error string, but we translate it to some text, while we should be
returning the error_code attribute, and have it documented on the spec as
proposed on bug 28020.

Early feedback is welcome, as I would base several things on top of this!

THANKS!

[1] https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28020
[2] https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128816

-- 
Tomás Cohen Arazi
Theke Solutions (http://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20211227/feb17a27/attachment.htm>


More information about the Koha-devel mailing list