I found 3 slightly different situations where the app asks me to send information to the developer when it is just a simple connection issue (you certainly don't want these error reports in your inbox).
Unable to resolve the DNS-Name of the server (e.g. internet connection lost or DNS-Server down)
java.net.UnknownHostException: Unable to resolve host "<hostname>": No address associated with hostname
Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
Connection Timeout (e.g. internet connection lost or server down - still having the IP in the DNS-Cache or using an IP insead of a DNS name in the URL)
java.net.SocketTimeoutException: failed to connect to <hostname>/<ip> (port <port>) after 15000ms
Connection Refused (e.g. firewall denying the connection by sending a TCP RST packet)
java.net.ConnectException: failed to connect to <hostname>/<ip> (port <port>) after 15000ms: isConnected failed: ECONNREFUSED (Connection refused)
fun fact: on my phone the ConnectException said 'after 15000ms' but the exception triggered almost instantly
In some situations the app sends two (or more?) requests to the api simultaneously and therefore shows two "Server Error" popups overlapping as shown here:
(you can't really see it overlapping in the screenshot but I had to click Cancel twice to get rid of it)
I found 3 slightly different situations where the app asks me to send information to the developer when it is just a simple connection issue (you certainly don't want these error reports in your inbox).
java.net.UnknownHostException: Unable to resolve host "<hostname>": No address associated with hostname
libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
java.net.SocketTimeoutException: failed to connect to <hostname>/<ip> (port <port>) after 15000ms
java.net.ConnectException: failed to connect to <hostname>/<ip> (port <port>) after 15000ms: isConnected failed: ECONNREFUSED (Connection refused)
libcore.io.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
In some situations the app sends two (or more?) requests to the api simultaneously and therefore shows two "Server Error" popups overlapping as shown here: (you can't really see it overlapping in the screenshot but I had to click Cancel twice to get rid of it)