PCRUD returns osrfMethodException after "Request Complete"

Bug #1808016 reported by Bill Erickson
44
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.10
Fix Released
Medium
Unassigned
3.9
Fix Released
Medium
Unassigned

Bug Description

Evergreen 3.2

Steps to reproduce detailed in:

https://bugs.launchpad.net/evergreen/+bug/1807461/comments/5

An exception is raised in PCRUD as a result of attempting to create an object with a NULL value for the context org unit. However, before the exception message is returned to the client, a Request Complete message is returned. The client sees the Request Complete messages, assumes the conversation is done, and ignores the exception message.

Sample logs, trimmed to only show the highlights:

2018-12-11 14:03:27 localhost open-ils.pcrud: [INFO:6477:osrf_application.c:1075:154455500464953]
CALL: open-ils.pcrud open-ils.pcrud.create.acqclt "<AUTHTOKEN>",{"__c":"acqclt","__p":[null,null,"asdf","asdf"]}

2018-12-11 14:03:27 localhost open-ils.pcrud: [DEBG:6477:osrf_app_session.c:1180:154455500464953] Sent: [{"__c":"osrfMessage","__p":{"threadTrace":"2","locale":"en-US","api_level":1,"type":"STATUS","payload":{"__c":"osrfConnectStatus","__p":{"status":"Request Complete","statusCode":"205"}}}}]

2018-12-11 14:03:27 localhost open-ils.pcrud: [WARN:6477:osrf_application.c:855:154455500464953] Returning method exception with message: An unknown server error occurred

2018-12-11 14:03:27 localhost open-ils.pcrud: [DEBG:6477:osrf_app_session.c:1180:154455500464953] Sent: [{"__c":"osrfMessage","__p":{"threadTrace":"2","locale":"en-US","api_level":1,"type":"STATUS","payload":{"__c":"osrfMethodException","__p":{"status":"An unknown server error occurred","statusCode":"404"}}}}]

The client should only receive the osrfMethodException message and not the osrfConnectStatus ("Request Complete") message.

tags: added: silentfailure
Revision history for this message
Bill Erickson (berick) wrote :

Noting this is also the underlying cause for bug #1693580 and bug #1716765.

Changed in evergreen:
assignee: nobody → Jane Sandberg (sandbergja)
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Here's a branch: user/sandbergja/lp1808016-pcrud-complete-before-error

And a link: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/sandbergja/lp1808016-pcrud-complete-before-error

To test, you can use the steps in any of the duplicates of this bug.

tags: added: pullrequest
Changed in evergreen:
assignee: Jane Sandberg (sandbergja) → nobody
Changed in evergreen:
status: New → Confirmed
milestone: none → 3.10.2
importance: Undecided → Medium
Revision history for this message
Terran McCanna (tmccanna) wrote :

This is so helpful! I tested it on multiple different Server Admin pages where Success messages used to appear when creations and updates actually failed due to permissions (for example, editing circulation modifiers and create/edit floating groups from circulator accounts without the proper perms) and they now show a failure message instead of a success message. Woo hoo!

My sign off is at: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mccanna/lp1808016-pcrud-complete-before-error-signoff

(Note there are still some other things that silently fail due to other possible reasons, but this fixes a lot of them.)

tags: added: signedoff
Galen Charlton (gmc)
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Changed in evergreen:
assignee: Galen Charlton (gmc) → Mike Rylander (mrylander)
Revision history for this message
Galen Charlton (gmc) wrote :

Pushed down to rel_3_9. Thanks, Jane and Terran!

Changed in evergreen:
milestone: 3.10.2 → 3.11-beta
assignee: Mike Rylander (mrylander) → nobody
status: Confirmed → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.