Skip to content

Commit

Permalink
catch exception if social profile invalid
Browse files Browse the repository at this point in the history
Signed-off-by: call-me-matt <nextcloud@matthiasheinisch.de>
  • Loading branch information
call-me-matt committed Oct 7, 2020
1 parent 604e1b1 commit 67a1cdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/SocialApiService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
}

Expand Down

0 comments on commit 67a1cdd

Please sign in to comment.