I am seeing a spike in these types of errors in my production app via logs:
"Unable to resolve host "{my.api.website}": No address associated with hostname"
The site / API works for 99.9% of people and I am only seeing this intermittently.
It appears as though it is an issue with internet connectivity as per these links:
- Unable to resolve host "<url here>"; No address associated with hostname
- java.net.UnknownHostException: Unable to resolve host "<url>": No address associated with hostname and End of input at character 0 of
I have therefore setup some retry logic so that it will make another attempt, but the problem is that I am unsure how to actually intentionally trigger this exception using an Android device (either emulator or live) to see if the new fix works.
How would I go about manually triggering a java.lang.exception
where the site I am hitting throws this unable to resolve host
issue?