Anyone have any idea how I can call the onFailure callback from the Interceptor class attached to the OkHttp client?
2 Answers
@warnyul comment was right. Once I threw the IOException, it triggered the failure.
Try to throw an exception. When an interceptor throws an exception, okhttp calls the onFailure callback