https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21289 Bug ID: 21289 Summary: Error when sending emails to partner libraries Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: ILL Assignee: koha-bugs@lists.koha-community.org Reporter: andrew.isherwood@ptfs-europe.com During the "Place request with partners" workflow, at the point of sending the request mail, an "Internal server error" is displayed and the following is logged: Can't call method "isa" on unblessed reference at /home/koha/kohaclone/ill/ill-requests.pl line 241. The error here is misleading. It is due to the 'catch' block being called without an instance of a Koha::Exceptions::Ill object being passed. The reason it is being called is that the handle_commit_maybe sub is being called inside it. The handle_commit_maybe sub redirects the client, the exits: 295 # Redirect to a view of the newly created request 296 print $cgi->redirect( 297 '/cgi-bin/koha/ill/ill-requests.pl?method=illview&illrequest_id='. 298 $request->id 299 ); 300 exit; This is correct, but because it is being called inside the try block, the "exit" causes the catch block to be called, despite the client being redirected. A patch for this should move the call to handle_commit_maybe outside of the try block, we will still only reach it if everything inside the try block succeeded. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.