summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--external/feedapi.php5
-rw-r--r--tests/unit/external/FeedAPITest.php6
2 files changed, 9 insertions, 2 deletions
diff --git a/external/feedapi.php b/external/feedapi.php
index 684769c6e..fa0f27f7c 100644
--- a/external/feedapi.php
+++ b/external/feedapi.php
@@ -214,7 +214,10 @@ class FeedAPI extends Controller {
try {
$this->feedBusinessLayer->update($feedId, $userId);
// ignore update failure (feed could not be reachable etc, we dont care)
- } catch(BusinessLayerException $ex) {}
+ } catch(\Exception $ex) {
+ $this->api->log('Could not update feed ' . $ex->getMessage(),
+ 'debug');
+ }
return new JSONResponse();
}
diff --git a/tests/unit/external/FeedAPITest.php b/tests/unit/external/FeedAPITest.php
index 9a092a84e..e490bbdf9 100644
--- a/tests/unit/external/FeedAPITest.php
+++ b/tests/unit/external/FeedAPITest.php
@@ -494,7 +494,11 @@ class FeedAPITest extends ControllerTestUtility {
public function testUpdateError() {
$this->feedBusinessLayer->expects($this->once())
->method('update')
- ->will($this->throwException(new BusinessLayerException($this->msg)));
+ ->will($this->throwException(new \Exception($this->msg)));
+ $this->api->expects($this->once())
+ ->method('log')
+ ->with($this->equalTo('Could not update feed ' . $this->msg),
+ $this->equalTo('debug'));
$response = $this->feedAPI->update();