code: private Chain<ApiRequest> createRequestChain(IAsyncHandler<ApiRequest> requestHandler) {
          RequestChain chain = new RequestChain(policyImpls, context);
          chain.headHandler(requestHandler);
          chain.policyFailureHandler(failure -> {
              // Jump straight to the response leg.
              // It will likely not have been initialised, so create one.
              if (responseChain == null) {
                  // Its response will not be used as we take the failure path only, so we just use an empty lambda.
                  responseChain = createResponseChain((ignored) -> {});
              }
              responseChain.doFailure(failure);
          });
          chain.policyErrorHandler(policyErrorHandler);
          return chain;
      }
docs: Creates the chain used to apply policies in order to the api request.