mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
Add KEYS_WITHHELD error type to analytics
This commit is contained in:
parent
cc705d5458
commit
e368046b84
1 changed files with 7 additions and 5 deletions
|
@ -38,7 +38,8 @@ private data class DecryptionFailure(
|
|||
val failedEventId: String,
|
||||
val error: MXCryptoError.ErrorType
|
||||
)
|
||||
private typealias DetailedErrorName = Pair<String, Error.Name>
|
||||
private typealias DetailedErrorName = Pair<String, Error.Name>
|
||||
|
||||
private const val GRACE_PERIOD_MILLIS = 4_000
|
||||
private const val CHECK_INTERVAL = 2_000L
|
||||
|
||||
|
@ -145,10 +146,11 @@ class DecryptionFailureTracker @Inject constructor(
|
|||
private fun MXCryptoError.ErrorType.toAnalyticsErrorName(): DetailedErrorName {
|
||||
val detailed = "$name | mxc_crypto_error_type"
|
||||
return when (this) {
|
||||
MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID -> Pair(detailed, Error.Name.OlmKeysNotSentError)
|
||||
MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError)
|
||||
MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError)
|
||||
else -> Pair(detailed, Error.Name.UnknownError)
|
||||
MXCryptoError.ErrorType.UNKNOWN_INBOUND_SESSION_ID,
|
||||
MXCryptoError.ErrorType.KEYS_WITHHELD -> Pair(detailed, Error.Name.OlmKeysNotSentError)
|
||||
MXCryptoError.ErrorType.OLM -> Pair(detailed, Error.Name.OlmUnspecifiedError)
|
||||
MXCryptoError.ErrorType.UNKNOWN_MESSAGE_INDEX -> Pair(detailed, Error.Name.OlmIndexError)
|
||||
else -> Pair(detailed, Error.Name.UnknownError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue