diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2023-06-26 10:52:07 +0200 |
---|---|---|
committer | backportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com> | 2023-06-27 11:08:39 +0000 |
commit | 0fd478b9e3973933fa7f33b85df433a10ef594f0 (patch) | |
tree | 522d7687fc90e9d17b1a28489c48de70e1c98c2d /apps/dav | |
parent | ff04de6fbcf21d57410305a6e123d0d2f30491f7 (diff) | |
download | nextcloud-server-0fd478b9e3973933fa7f33b85df433a10ef594f0.tar.gz nextcloud-server-0fd478b9e3973933fa7f33b85df433a10ef594f0.zip |
fix(dav): Catch SAB sync errors during upgrade
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Migration/Version1027Date20230504122946.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/dav/lib/Migration/Version1027Date20230504122946.php b/apps/dav/lib/Migration/Version1027Date20230504122946.php index e9ae174f56e..be3d19e8a80 100644 --- a/apps/dav/lib/Migration/Version1027Date20230504122946.php +++ b/apps/dav/lib/Migration/Version1027Date20230504122946.php @@ -34,6 +34,7 @@ use OCP\Migration\SimpleMigrationStep; 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 @@ class Version1027Date20230504122946 extends SimpleMigrationStep { * @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'); + } } } |