From 67a1cdd89bd81bc76b20eeb0a5fcbe39bfa48c63 Mon Sep 17 00:00:00 2001 From: call-me-matt Date: Wed, 7 Oct 2020 14:53:55 +0200 Subject: [PATCH] catch exception if social profile invalid Signed-off-by: call-me-matt --- lib/Service/SocialApiService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Service/SocialApiService.php b/lib/Service/SocialApiService.php index 8594ba684..03484c99e 100644 --- a/lib/Service/SocialApiService.php +++ b/lib/Service/SocialApiService.php @@ -209,7 +209,7 @@ public function updateContact(string $addressbookId, string $contactId, string $ } $addressBook->createOrUpdate($changes, $addressbookId); - } catch (Exception $e) { + } catch (\Exception $e) { return new JSONResponse([], Http::STATUS_INTERNAL_SERVER_ERROR); } return new JSONResponse([], Http::STATUS_OK); @@ -383,7 +383,7 @@ public function updateAddressbooks(string $network, string $userId, string $offs try { $r = $this->updateContact($addressBook->getURI(), $contact['UID'], $network); $response = $this->registerUpdateResult($response, $contact['FN'], $r->getStatus()); - } catch (Exception $e) { + } catch (\Exception $e) { $response = $this->registerUpdateResult($response, $contact['FN'], '-1'); }