Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8af8c263 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

bliss: Catch qwant IOException

parent 9293e2b9
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ package foundation.e.bliss.suggestions.qwant
import foundation.e.bliss.suggestions.RetrofitService
import foundation.e.bliss.suggestions.SuggestionProvider
import foundation.e.bliss.suggestions.SuggestionsResult
import java.io.IOException
import retrofit2.HttpException
import timber.log.Timber

@@ -31,6 +32,9 @@ class QwantProvider : SuggestionProvider {
        } catch (e: HttpException) {
            Timber.e("HTTP error: ${e.code()} - ${e.message()}")
            SuggestionsResult(query).apply { networkItems = emptyList() }
        } catch (e: IOException) {
            Timber.e("HTTP error: $e - ${e.message}")
            SuggestionsResult(query).apply { networkItems = emptyList() }
        }
    }
}