/** * Gets called when an http request error takes place. This is the case when the returned http status code doesn't * lie in the range 200 (inclusive) and 300 (exclusive). */ public void onHttpError(@NotNull ApolloHttpException e) { onFailure(e); Response response = e.rawResponse(); if (response != null) { response.close(); } }
/** * <p>Gets called when an http request error takes place. This is the case when the returned http status code * doesn't lie in the range 200 (inclusive) and 300 (exclusive).</p> * * <b>NOTE:</b> by overriding this callback you must call {@link okhttp3.Response#close()} on {@link * ApolloHttpException#rawResponse} to close the network connection. */ public void onHttpError(@NotNull ApolloHttpException e) { onFailure(e); okhttp3.Response response = e.rawResponse(); if (response != null) { response.close(); } }
@Override public void accept(Throwable throwable) throws Exception { errorRef.set(throwable); errorResponse.set(((ApolloHttpException) throwable).rawResponse().body().string()); } })
/** * Gets called when an http request error takes place. This is the case when the returned http status code doesn't * lie in the range 200 (inclusive) and 300 (exclusive). */ public void onHttpError(@Nonnull ApolloHttpException e) { onFailure(e); Response response = e.rawResponse(); if (response != null) { response.close(); } }
/** * Gets called when an http request error takes place. This is the case when the returned http status code doesn't * lie in the range 200 (inclusive) and 300 (exclusive). */ public void onHttpError(@Nonnull ApolloHttpException e) { onFailure(e); Response response = e.rawResponse(); if (response != null) { response.close(); } }
/** * <p>Gets called when an http request error takes place. This is the case when the returned http status code * doesn't lie in the range 200 (inclusive) and 300 (exclusive).</p> * * <b>NOTE:</b> by overriding this callback you must call {@link okhttp3.Response#close()} on {@link * ApolloHttpException#rawResponse} to close the network connection. */ public void onHttpError(@Nonnull ApolloHttpException e) { onFailure(e); okhttp3.Response response = e.rawResponse(); if (response != null) { response.close(); } }
/** * <p>Gets called when an http request error takes place. This is the case when the returned http status code * doesn't lie in the range 200 (inclusive) and 300 (exclusive).</p> * * <b>NOTE:</b> by overriding this callback you must call {@link okhttp3.Response#close()} on {@link * ApolloHttpException#rawResponse} to close the network connection. */ public void onHttpError(@Nonnull ApolloHttpException e) { onFailure(e); okhttp3.Response response = e.rawResponse(); if (response != null) { response.close(); } }