diff options
author | Simon L <szaimen@e.mail.de> | 2023-06-27 13:01:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 13:01:39 +0200 |
commit | 06c99e02563ba138e490a84145825ba8c7f0cdc7 (patch) | |
tree | bd3fba2869aa8c6f618dfb434deacda151f3a9b3 /apps/dav | |
parent | 4cfab4b838ed40dec200f7673992009896c69f16 (diff) | |
parent | 92c18b252c12acb06c343b11fb36f322f4d17adf (diff) | |
download | nextcloud-server-06c99e02563ba138e490a84145825ba8c7f0cdc7.tar.gz nextcloud-server-06c99e02563ba138e490a84145825ba8c7f0cdc7.zip |
Merge pull request #39005 from nextcloud/fix/dav/upgrade-catch-sab-sync-errors
fix(dav): Catch SAB sync errors during upgrade
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'); + } } } |