From 67a1cdd89bd81bc76b20eeb0a5fcbe39bfa48c63 Mon Sep 17 00:00:00 2001 From: call-me-matt Date: Wed, 7 Oct 2020 14:53:55 +0200 Subject: catch exception if social profile invalid Signed-off-by: call-me-matt --- lib/Service/SocialApiService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/Service/SocialApiService.php b/lib/Service/SocialApiService.php index 8594ba68..03484c99 100644 --- a/lib/Service/SocialApiService.php +++ b/lib/Service/SocialApiService.php @@ -209,7 +209,7 @@ class SocialApiService { } $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 @@ class SocialApiService { 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'); } -- cgit v1.2.3