LP#1390225: Fail to care about errors from auth.session.delete
authorMike Rylander <mrylander@gmail.com>
Thu, 6 Nov 2014 21:03:36 +0000 (16:03 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Fri, 7 Nov 2014 17:35:08 +0000 (12:35 -0500)
We're just tossing this call over the wall and moving on.  We don't
care if the session wasn't there to delete or even if we didn't pass
a session to the server.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader.pm

index 868907d..3d717ad 100644 (file)
@@ -483,11 +483,13 @@ sub load_logout {
     # while logged in, go ahead and clear it out.
     $self->clear_anon_cache;
 
-    $U->simplereq(
-        'open-ils.auth',
-        'open-ils.auth.session.delete',
-        $self->cgi->cookie(COOKIE_SES)
-    );
+    try { # a missing auth token will cause an ugly explosion
+        $U->simplereq(
+            'open-ils.auth',
+            'open-ils.auth.session.delete',
+            $self->cgi->cookie(COOKIE_SES)
+        );
+    } catch Error with {};
 
     return $self->generic_redirect(
         $redirect_to || $self->ctx->{home_page},