-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when use policy #5891
Comments
Hi! It looks like you're having a network issue. This can happen if your device has a connectivity issue, or e.g. if the backend is not responding. |
I enabled working offline from cache policy |
|
I disable wifi to test app working offline |
In that case what you're seeing is definitely expected. You should probably add a |
Hi! Anything else we can do here? |
Version
3.8.2
Summary
override suspend fun getMerchantsByKeyWord(keyword:String): Flow<Response> {
return apolloClient.query(MerchantsByKeyWordQuery(keyword)).fetchPolicy(FetchPolicy.CacheAndNetwork)
.toFlow()
.map { response ->
try {
//response.data.merchants
Response.Success(response.data?.toRestaurantsSearch() as T)
} catch (e: Exception) {
Response.Failure( e.message ?: "unknown error")
}
}
}
Steps to reproduce the behavior
No response
Logs
The text was updated successfully, but these errors were encountered: