From 1f4dd107a228140cf084405f33258ef6aac8f84c Mon Sep 17 00:00:00 2001 From: yamilmedina Date: Wed, 6 Nov 2024 15:04:57 +0100 Subject: [PATCH] chore: improve logging for backups --- .../wire/kalium/logic/feature/backup/RestoreBackupUseCase.kt | 2 +- .../wire/kalium/logic/feature/backup/RestoreWebBackupUseCase.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreBackupUseCase.kt b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreBackupUseCase.kt index 18420f1147b..cb2c5c105ac 100644 --- a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreBackupUseCase.kt +++ b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreBackupUseCase.kt @@ -96,7 +96,7 @@ internal class RestoreBackupUseCaseImpl( } } .fold({ error -> - kaliumLogger.e("$TAG Failed to restore the backup, reason: ${error.failure.cause}") + kaliumLogger.e("$TAG Failed to restore the backup, reason: ${error.failure}") error }, { kaliumLogger.i("$TAG Backup restored successfully") diff --git a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreWebBackupUseCase.kt b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreWebBackupUseCase.kt index 63804d9bdc9..a4222e457aa 100644 --- a/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreWebBackupUseCase.kt +++ b/logic/src/commonMain/kotlin/com/wire/kalium/logic/feature/backup/RestoreWebBackupUseCase.kt @@ -80,7 +80,7 @@ internal class RestoreWebBackupUseCaseImpl( } else { Either.Left(IncompatibleBackup("invoke: The provided backup format is not supported")) }.fold({ error -> - kaliumLogger.e("$TAG Failed to restore the backup, reason: ${error.cause}") + kaliumLogger.e("$TAG Failed to restore the backup, reason: ${error}") RestoreBackupResult.Failure(error) }, { kaliumLogger.i("$TAG Successfully restored the backup")