diff --git a/apps/dav/lib/Migration/Version1027Date20230504122946.php b/apps/dav/lib/Migration/Version1027Date20230504122946.php index e9ae174f56e2b..be3d19e8a80da 100644 --- a/apps/dav/lib/Migration/Version1027Date20230504122946.php +++ b/apps/dav/lib/Migration/Version1027Date20230504122946.php @@ -34,6 +34,7 @@ use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Psr\Log\LoggerInterface; +use Throwable; class Version1027Date20230504122946 extends SimpleMigrationStep { private SyncService $syncService; @@ -49,6 +50,13 @@ public function __construct(SyncService $syncService, LoggerInterface $logger) { * @param array $options */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { - $this->syncService->syncInstance(); + try { + $this->syncService->syncInstance(); + } catch (Throwable $e) { + $this->logger->error('Could not sync system address books during update', [ + 'exception' => $e, + ]); + $output->warning('System address book sync failed. See logs for details'); + } } }