code: @Override public Response intercept(Chain chain) throws IOException {
      final Request request = chain.request();
      final Response response = chain.proceed(request);
  
      if (!response.isSuccessful()) {
        throw new CMAHttpException(request, response);
      }
  
      return response;
    }
docs: Intercepts chain to check for unsuccessful requests.
  
  @param chain provided by the framework to check
  @return the response if no error occurred
  @throws IOException will get thrown if response code is unsuccessful