aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-06-26 10:52:07 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-06-26 10:52:07 +0200
commit92c18b252c12acb06c343b11fb36f322f4d17adf (patch)
treed6b1cb4e0d224dc8ea07f4c68f25a4a17cac9ca5
parent783f1b9a2a0cf868fcbe440f3d8fb19e7f175172 (diff)
downloadnextcloud-server-92c18b252c12acb06c343b11fb36f322f4d17adf.tar.gz
nextcloud-server-92c18b252c12acb06c343b11fb36f322f4d17adf.zip
fix(dav): Catch SAB sync errors during upgrade
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r--apps/dav/lib/Migration/Version1027Date20230504122946.php10
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');
+ }
}
}