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:39:31 +0000 (12:39 -0400)
commite89d92eab07c0697789836244eb9b582e3ee0a3c
treec4e4a9a37cacfc7683c83a294bd07088ebbf85f9
parent03d26400f700c6fd3ac5426f7cc60c777d23c63d
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]