[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. a7a0007367e895a39c250b4518d23f4a124e9ec8

Evergreen Git git at git.evergreen-ils.org
Mon Apr 9 15:19:29 EDT 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_2 has been updated
       via  a7a0007367e895a39c250b4518d23f4a124e9ec8 (commit)
      from  3c71b24ffb06049587db24c7bd4d70d135e6f790 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a7a0007367e895a39c250b4518d23f4a124e9ec8
Author: Dan Scott <dan at coffeecode.net>
Date:   Sun Apr 8 18:13:26 2012 -0400

    TPAC: Protect against requests for non-existent records
    
    If a record request is received for a record that does not exist (say,
    if 100 records have been loaded and someone submits a request for
    /eg/opac/record/399), rather than dying with a server error, return
    immediately.
    
    Eventually we'll want to provide an explicit "record was not
    found error" in the TPAC record details; for now the TPAC just displays
    zero bib detail.
    
    Signed-off-by: Dan Scott <dan at coffeecode.net>
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
index 3fd9983..b4fe528 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm
@@ -229,6 +229,10 @@ sub get_records_and_facets {
         success_handler => sub {
             my($self, $req) = @_;
             my $data = $req->{response}->[0]->content;
+
+            # Protect against requests for non-existent records
+            return unless $data->{'unapi.bre'};
+
             my $xml = XML::LibXML->new->parse_string($data->{'unapi.bre'})->documentElement;
 
             # Protect against legacy invalid MARCXML that might not have a 901c

-----------------------------------------------------------------------

Summary of changes:
 .../perlmods/lib/OpenILS/WWW/EGCatLoader/Util.pm   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list