public static <I extends Request, O extends Response, U extends Client<I, O>>
    O initContextAndExecuteWithFallback(
            U delegate,
            ClientRequestContextExtension ctx,
            Function<CompletableFuture<O>, O> futureConverter,
            BiFunction<ClientRequestContext, Throwable, O> errorResponseFactory,
            I req, boolean tryCompleteLog) {

        requireNonNull(delegate, "delegate");
        requireNonNull(ctx, "ctx");
        requireNonNull(futureConverter, "futureConverter");
        requireNonNull(errorResponseFactory, "errorResponseFactory");

        boolean initialized = false;
        boolean success = false;
        O response;
        try {
            final CompletableFuture<Boolean> initFuture = ctx.init();
            initialized = initFuture.isDone();
            if (initialized) {
                // Initialization has been done immediately.
                try {
                    success = initFuture.get();
                } catch (Exception e) {
                    throw UnprocessedRequestException.of(Exceptions.peel(e));
                }

                response = initContextAndExecuteWithFallback(delegate, ctx, errorResponseFactory, success, req);
            } else {
                response = futureConverter.apply(initFuture.handle((success0, cause) -> {
                    try {
                        if (cause != null) {
                            throw UnprocessedRequestException.of(Exceptions.peel(cause));
                        }

                        return initContextAndExecuteWithFallback(
                                delegate, ctx, errorResponseFactory, success0, req);
                    } catch (Throwable t) {
                        fail(ctx, t);
                        return errorResponseFactory.apply(ctx, t);
                    } finally {
                        ctx.finishInitialization(success0);
                    }
                }));
            }
        } catch (Throwable cause) {
            fail(ctx, cause);
            response = errorResponseFactory.apply(ctx, cause);
        } finally {
            if (initialized) {
                ctx.finishInitialization(success);
            }
        }

        if (tryCompleteLog) {
            completeLogIfIncomplete(ctx, response);
        }
        return response;
    }
An undefined {@link URI} to create {@link WebClient} without specifying {@link URI}.
core/src/main/java/com/linecorp/armeria/internal/client/ClientUtil.java