private BiFunction<Object, Throwable, HttpResponse> handleResult(
            ServiceRequestContext ctx, ResponseHeaders headers, HttpHeaders trailers) {
        return (result, cause) -> {
            if (cause != null) {
                return onError(ctx, cause);
            }
            return onSuccess(ctx, headers, result, trailers);
        };
    }
Creates a new {@link ResponseConverterFunction} instance.

@param responseConverter the function which converts an object with the configured
                         {@link ResponseConverterFunction}
rxjava3/src/main/java/com/linecorp/armeria/server/rxjava3/ObservableResponseConverterFunction.java