mirror of
https://github.com/element-hq/element-android
synced 2024-10-26 04:36:48 +03:00
Return Try.Failure instead of throwing exception.
This commit is contained in:
parent
c4f2eeeab7
commit
319667096f
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ internal class DefaultFileService @Inject constructor(
|
|||
if (elementToDecrypt != null) {
|
||||
Timber.v("## decrypt file")
|
||||
inputStream = MXEncryptedAttachments.decryptAttachment(inputStream, elementToDecrypt)
|
||||
?: throw IllegalStateException("Decryption error")
|
||||
?: return@flatMap Try.Failure(IllegalStateException("Decryption error"))
|
||||
}
|
||||
|
||||
writeToFile(inputStream, destFile)
|
||||
|
|
Loading…
Reference in a new issue