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
_______________________________________________ Koha-devel mailing list Koha-devel@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel website : https://www.koha-community.org/ git : https://git.koha-community.org/ bugs : https://bugs.koha-community.org/