Is there way to retry Apollo Android query if DNS ...
# apollo-kotlin
s
Is there way to retry Apollo Android query if DNS lookup fails? I am running some tasks using Android WorkManager. The work manager is configured to run the task only when network connection is present. Inspiter of that sometimes we see that GQL query fails with DNS lookup failure (perhaps device just connected?) Is there way I can craft the Apollo Error handled that will retry the query with certain delay, if I encounter specific HTTP error and/or name resolution error?
m
If you are on Android, you can use an OkHttp interceptor
(Other platforms can use an HttpInterceptor but there's a lot less content out there so OkHttp is usually easier)