diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt index 983d016854..28d403c9a6 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/attachments/preview/AttachmentsPreviewPresenter.kt @@ -33,6 +33,7 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Job import kotlinx.coroutines.isActive import kotlinx.coroutines.launch +import timber.log.Timber import kotlin.coroutines.coroutineContext class AttachmentsPreviewPresenter @AssistedInject constructor( @@ -114,6 +115,7 @@ class AttachmentsPreviewPresenter @AssistedInject constructor( sendActionState.value = SendActionState.Done }, onFailure = { error -> + Timber.e(error, "Failed to send attachment") if (error is CancellationException) { throw error } else { diff --git a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt index 04ca34ac08..7a5c06721c 100644 --- a/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt +++ b/features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/messagecomposer/MessageComposerPresenter.kt @@ -72,6 +72,7 @@ import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.merge import kotlinx.coroutines.isActive import kotlinx.coroutines.launch +import timber.log.Timber import javax.inject.Inject import kotlin.coroutines.coroutineContext import kotlin.time.Duration.Companion.seconds @@ -432,6 +433,7 @@ class MessageComposerPresenter @Inject constructor( attachmentState.value = AttachmentsState.None } .onFailure { cause -> + Timber.e(cause, "Failed to send attachment") attachmentState.value = AttachmentsState.None if (cause is CancellationException) { throw cause