processFeed would abort on certain errors where findLocalObject failed
authorMikael Nordfeldth <mmn@hethane.se>
Tue, 5 Jan 2016 14:00:07 +0000 (15:00 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Tue, 5 Jan 2016 14:00:07 +0000 (15:00 +0100)
plugins/Favorite/classes/Fave.php
plugins/OStatus/classes/Ostatus_profile.php

index 66d5a186d8e2056f8a631c2609a174a71b7fc18b..a5acb66d20d80ef5bbf91c11a57ed7df3e187f39 100644 (file)
@@ -353,6 +353,8 @@ class Fave extends Managed_DataObject
      */
     static public function parseActivityObject(ActivityObject $actobj, Notice $stored)
     {
+        // throws exception if nothing was found, but it could also be a non-Notice...
+        // FIXME: This should only test _one_ URI (and not the links etc.) though a function like this could be useful in other cases
         $local = ActivityUtils::findLocalObject($actobj->getIdentifiers());
         if (!$local instanceof Notice) {
             // $local always returns something, but this was not what we expected. Something is wrong.
index 00c87bb004839838d9c9b7ae722a5625e0387cbd..e35cfe43577bd9fc9055fdc167db12b782cabf58 100644 (file)
@@ -473,6 +473,9 @@ class Ostatus_profile extends Managed_DataObject
                 $this->processEntry($entry, $feed, $source);
             } catch (AlreadyFulfilledException $e) {
                 common_debug('We already had this entry: '.$e->getMessage());
+            } catch (ServerException $e) {
+                // FIXME: This should be UnknownUriException and the ActivityUtils:: findLocalObject should only test one URI
+                common_log(LOG_ERR, 'Entry threw exception while processing a feed from '.$source.': '.$e->getMessage());
             }
         }
     }