diff --git a/module/finc/src/finc/Recommend/EbscoResults.php b/module/finc/src/finc/Recommend/EbscoResults.php index fce9d9dab7565bffb392b78a442a2d7a8900e5e7..79a0b5c845b768ad37d81c32c0650922a4dcfa32 100644 --- a/module/finc/src/finc/Recommend/EbscoResults.php +++ b/module/finc/src/finc/Recommend/EbscoResults.php @@ -163,12 +163,17 @@ class EbscoResults implements \VuFind\Recommend\RecommendInterface, if (!$results->isSuccess()) { $this->results = false; + return; } $this->results = $this->sortByHits( json_decode($results->getBody(), true) ); if (json_last_error() !== JSON_ERROR_NONE) { - throw new \Exception('JSON type error ' . json_last_error_msg()); + $this->debug( + 'JSON type error "' + . json_last_error_msg().'"' + . (empty($results->getBody()) ? '. EBSCO result was empty.' : '') + ); } }