diff --git a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt index 1f0d13c9bf..74ad10ad26 100644 --- a/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt +++ b/libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/RustMatrixTimeline.kt @@ -194,8 +194,12 @@ class RustMatrixTimeline( waitForToken = true, ) innerRoom.paginateBackwards(paginationOptions) - }.onFailure { - Timber.d(it, "Fail to paginate for room ${matrixRoom.roomId}") + }.onFailure { error -> + if (error is TimelineException.CannotPaginate) { + Timber.d("Can't paginate backwards on room ${matrixRoom.roomId}, we're already at the start") + } else { + Timber.e(error, "Error paginating backwards on room ${matrixRoom.roomId}") + } }.onSuccess { Timber.v("Success back paginating for room ${matrixRoom.roomId}") }