fix logging rel_3_4_2_rbdigital
authorChris Sharp <csharp@georgialibraries.org>
Wed, 8 Apr 2020 14:47:57 +0000 (10:47 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 8 Apr 2020 14:51:22 +0000 (10:51 -0400)
Open-ILS/src/perlmods/lib/OpenILS/Application/EbookAPI/RBDigital.pm

index a9292da..59eb86e 100644 (file)
@@ -192,7 +192,9 @@ sub do_patron_auth {
     if ($patron_id eq 0) {
         # try to authenticate the user with a username
         $patron_id = $self->_get_patron_id($username);
-        $logger->error("EbookAPI: Unable to get RBDigital Patron ID found for $username/$email");
+        unless($patron_id) {
+            $logger->error("EbookAPI: No RBDigital Patron ID found for $username/$email");
+        }
     }
 
     return $patron_id;
@@ -220,7 +222,7 @@ sub _get_patron_id {
             $self->{patron_id} = $res->{content}->{patronId};
             return $res->{content}->{patronId};
         } else {
-            $logger->error("EbookAPI: Unable to get patron Id from RBDigital portal: ".$res->{content});
+            $logger->error("EbookAPI: Unable to get patron Id from RBDigital portal: ".$res->{content}->{message});
             return 0;
         }
     } else {