ErrorHandler

Functions

Link copied to clipboard
fun handleError(throwable: Throwable): AppError
Link copied to clipboard
fun logError(error: AppError, tag: String = TAG)
Link copied to clipboard
suspend fun <T> retryWithBackoff(retries: Int = 3, initialDelay: Long = 1000, maxDelay: Long = 10000, factor: Double = 2.0, shouldRetry: (Throwable) -> Boolean = { throwable -> val error = handleError(throwable) error !is AppError.AuthError && error !is AppError.TwoFactorRequired }, block: suspend () -> T): Result<T>
Link copied to clipboard
fun <T> Flow<T>.retryWithErrorHandling(retries: Int = 3, initialDelay: Long = 1000): Flow<T>