properly catch exceptions of detailsCircle

Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
Georg Ehrke 2019-03-03 23:07:07 +01:00
parent 58c92e6047
commit dc26d94014
No known key found for this signature in database
GPG Key ID: 9D98FD9380A1CB43
1 changed files with 9 additions and 1 deletions

View File

@ -34,6 +34,8 @@
namespace OCA\DAV\Connector\Sabre; namespace OCA\DAV\Connector\Sabre;
use OCA\Circles\Exceptions\CircleDoesNotExistException;
use OCP\AppFramework\QueryException;
use OCP\IConfig; use OCP\IConfig;
use OCP\IGroup; use OCP\IGroup;
use OCP\IGroupManager; use OCP\IGroupManager;
@ -404,7 +406,13 @@ class Principal implements BackendInterface {
return null; return null;
} }
$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($circleUniqueId); try {
$circle = \OCA\Circles\Api\v1\Circles::detailsCircle($circleUniqueId, true);
} catch(QueryException $ex) {
return null;
} catch(CircleDoesNotExistException $ex) {
return null;
}
if (!$circle) { if (!$circle) {
return null; return null;