Chalmers recently reported an issue - when they are trying to open loans for a given user, the UI displays a white screen reporting an error that contributors cannot be fetched for a null object or similar. On digging further, we identified that the item referenced in the loan is missing. Sample request which has been fixed since by correcting data - https://chalmers.folio.ebsco.com/users/db27aa12-83a2-47ab-8f1f-97c64c58acd2/loans/open
Steps to Reproduce:
- Log into any FOLIO environment as User X
- Not sure if this is possible from UI but create a loan and then delete the item associated using API
- Try opening the loans associated with the user and we can see the white screen
A graceful error message indicating the cause of the problem. Like 'item associated with loan is missing'
White screen with no indication of real error either in console js or n/w traffic
Again for Chalmers, we noticed that the timer job that expires patron sessions isn't working and failing with a NPE like below (the notice portion of this issue will be handled as part of
CIRC-926 & CIRC-925):
12:17:50 INFO TenantManager timer call failed to module mod-circulation-18.0.9 for tenant fs00001000 : POST request for mod-circulation-18.0.9 /circulation/notice-session-expiration-by-timeout failed with 500: java.lang.NullPointerException
On investigating further and digging literally into every reference, identified that the NPE was being caused because items associated with loans were missing. It could have saved a lot of time in troubleshooting if these references were checked in code(defensive coding) and appropriate error messaging was in place.
Please feel free to break these into separate UI and backend stories as needed.