Add New Patron Fails with Wrong Error Message if DB Update Fails

Bug #1698176 reported by Jason Stephenson on 2017-06-15
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen Version 2.12.1
OpenSRF Version 2.5.0
PostgreSQL Version: 9.3+ N/A

If the database insert statement fails while adding a new user, the cstore editor die_event is returned improperly in the _add_patron helper function of OpenILS::Application::Actor. The caller expects a 2-member array with the first being the user object and the second being the event. In the case of the database failure, only the event is returned a scalar value.

Rather than dying with the event message, the caller treats the event as the user object which leads to a later failure with the message: Can't call method "billing_address" on unblessed reference at /path/to/perlib/OpenILS/Application/ line 743.

For some more information, see the IRC conversation between Freddy_Enrique and Dyrcona beginning here:

Jason Stephenson (jstephenson) wrote :

I forgot to link the branch, so here it is, rebased on master:


tags: added: pullrequest
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers