code: private static void attemptRetryOnException(String logPrefix, Request<?> request,
                                                  JusError exception) throws JusError {
          RetryPolicy retryPolicy = request.getRetryPolicy();
  
          if (retryPolicy == null) {
              throw exception;
          }
  
          try {
              retryPolicy.retry(exception);
          } catch (JusError e) {
              request.addMarker(Request.EVENT_NETWORK_RETRY_FAILED,
                      String.format("%s-timeout-giveup [conn-timeout=%s] [read-timeout=%s]",
                              logPrefix, retryPolicy.getCurrentConnectTimeout(),
                              retryPolicy.getCurrentReadTimeout()));
              throw e;
          }
          request.addMarker(Request.EVENT_NETWORK_RETRY,
                  String.format("%s-retry [conn-timeout=%s] [read-timeout=%s]",
                          logPrefix, retryPolicy.getCurrentConnectTimeout(),
                          retryPolicy.getCurrentReadTimeout()));
      }
docs: Attempts to prepare the request for a retry. If there are no more attempts remaining in the
  request's retry policy, a timeout exception is thrown.
  
  @param request The request to use.