I have the following setup:
final OkHttpClient okHttpClient = new OkHttpClient();
okHttpClient.setReadTimeout(5, TimeUnit.SECONDS);
okHttpClient.setConnectTimeout(5, TimeUnit.SECONDS);
RestAdapter.Builder builder = new RestAdapter.Builder()
.setEndpoint(ROOT)
.setClient(new OkClient(okHttpClient))
.setLogLevel(RestAdapter.LogLevel.FULL);
I am trying to handle the situation in which my server is down and the user gets a connection timeout exception, this is my logging:
java.net.SocketTimeoutException: failed to connect to /192.168.0.53 (port 3000) after 5000ms
Full logging: http://pastebin.com/gscCGb7x
Is there a way to route this into the retrofit failure method so I can handle it over there?
Thanks in advance!