private Function<AggregatedHttpRequest, HttpResponse> invoke(ServiceRequestContext ctx) {
        return req -> {
            final Map<String, Object> arguments = getArguments(ctx, req);
            try {
                final Object result = operation.invoke(newInvocationContext(req, arguments));
                if (MONO_CLASS != null) {
                    return handleMaybeReactorResult(statusMapper, ctx, result, req.method());
                }

                return handleResult(statusMapper, ctx, result, req.method());
            } catch (Throwable throwable) {
                logger.warn("Unexpected exception while invoking {} with {}.",
                            WebOperationService.class.getSimpleName(), arguments, throwable);
                return Exceptions.throwUnsafely(throwable);
            }
        };
    }
{@link HttpService} to handle a {@link WebOperation}. Mostly inspired by reactive implementation in
{@link AbstractWebFluxEndpointHandlerMapping}.
spring/boot3-actuator-autoconfigure/src/main/java/com/linecorp/armeria/spring/actuate/WebOperationService.java