code: private static Observable<ViewQueryResponse> passThroughOrThrow(final ViewQueryResponse response) {
          final int responseCode = response.responseCode();
          if (responseCode == 200) {
              return Observable.just(response);
          }
  
          return response
              .error()
              .map(new Func1<String, ViewQueryResponse>() {
                  @Override
                  public ViewQueryResponse call(String error) {
                      if (shouldRetry(responseCode, error)) {
                          throw SHOULD_RETRY;
                      }
                      return response;
                  }
              })
              .singleOrDefault(response);
      }
docs: Helper method which decides if the response is good to pass through or needs to be retried.
  
  @param response the response to look at.
  @return the {@link ViewQueryResponse} if it can pass through or an error if it needs to be retried.