diff --git a/module/finc/src/finc/Recommend/EbscoResults.php b/module/finc/src/finc/Recommend/EbscoResults.php index 0aaf556bf342571d4760d05ec33109ed01703494..fec111d4998a10ba2aa96c18b33650c0d1e523c9 100644 --- a/module/finc/src/finc/Recommend/EbscoResults.php +++ b/module/finc/src/finc/Recommend/EbscoResults.php @@ -166,12 +166,17 @@ class EbscoResults implements 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.' : '') + ); } }