static RpcResponse from(CompletionStage<?> stage) {
        requireNonNull(stage, "stage");
        final CompletableRpcResponse res = new CompletableRpcResponse();
        stage.handle((value, cause) -> {
            if (cause != null) {
                res.completeExceptionally(Exceptions.peel(cause));
            } else if (value instanceof RpcResponse) {
                ((RpcResponse) value).handle((rpcResponseResult, rpcResponseCause) -> {
                    if (rpcResponseCause != null) {
                        res.completeExceptionally(Exceptions.peel(rpcResponseCause));
                    } else {
                        res.complete(rpcResponseResult);
                    }
                    return null;
                });
            } else {
                res.complete(value);
            }
            return null;
        });
        return res;
    }
Creates a new {@link RpcResponse} that is completed successfully or exceptionally based on the
completion of the specified {@link CompletionStage}.
core/src/main/java/com/linecorp/armeria/common/RpcResponse.java