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

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

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/Actor.pm line 743.

For some more information, see the IRC conversation between Freddy_Enrique and Dyrcona beginning here: http://irc.evergreen-ils.org/evergreen/2017-06-15#i_310553

Jason Stephenson (jstephenson) wrote :

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

working/user/dyrcona/lp1698176_add_patron_die_event_fix

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dyrcona/lp1698176_add_patron_die_event_fix

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