Since retrofit 1.8.0 it is deprecated
retrofitError.isNetworkError()
you should use
if (retrofitError.getKind() == RetrofitError.Kind.NETWORK) { }
There are several types of errors that you can handle:
NETWORK An error occurred while communicating with the server. IOException. Timeout, No connection, etc.
CONVERSION An exception was thrown while (de) serialized the body.
HTTP Non-200 HTTP status code was received from the server, for example. 502, 503, etc.
UNEXPECTED An internal error occurred while trying to execute the query. It is recommended that this exception be thrown so that your application crashes.
Muhammad Alfaifi Mar 15 '15 at 6:51 2015-03-15 06:51
source share