LP1808016: improve error handling by open-ils.pcrud
authorJane Sandberg <js7389@princeton.edu>
Mon, 6 Mar 2023 00:57:50 +0000 (16:57 -0800)
committerGalen Charlton <gmc@equinoxOLI.org>
Thu, 11 May 2023 16:36:35 +0000 (12:36 -0400)
commit1ef377fd76ef3988db17198c10649b50b7b67e08
treef44914156aecf9c40bfc89c35dc0ff4983eef7f4
parenta3b37fc20a559f0201d1b0d687528ce8f6a4c57d
LP1808016: improve error handling by open-ils.pcrud

This patch ensures that requests to open-ils.pcrud return
an error code (before the request completion code) when
a permissions or constraint check fails.

To test
-------
[1] Make an invalid request, e.g., by attempting to create a claim
    type whose owner is not set in the Acquisitions Claiming admin
    interface.
[2] Note that the user interface reports that the action succeeds
    (although the new claim type is not actually created).
[3] Apply the patch and repeat step 1. This time, the admin interface
    shoudl report that the creation failed.

Signed-off-by: Jane Sandberg <sandbergja@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/c-apps/oils_sql.c
Open-ILS/src/perlmods/live_t/lp1808016-pcrud-return-error-status.t [new file with mode: 0644]